Override hydra-editor screen reader text to 'this field' for accessib…#7291
Open
trmccormick wants to merge 1 commit intomainfrom
Open
Override hydra-editor screen reader text to 'this field' for accessib…#7291trmccormick wants to merge 1 commit intomainfrom
trmccormick wants to merge 1 commit intomainfrom
Conversation
Test Results 13 files ±0 13 suites ±0 2h 51m 6s ⏱️ - 3m 54s Results for commit 8c728ee. ± Comparison against base commit 8abde49. This pull request removes 373 and adds 367 tests. Note that renamed tests count towards both. |
Member
|
I'm concerned the css selector is not specific enough and might cause unintended side effects. I'm also not sure if using "this" is a significant improvement over "previous". I did a little hacking in a browser inspector and found it should be possible to have the current value of the input field be read out by the screen reader (e.g. "Remove Title [alternate title of work]"). Doing so requires the generated inputs to have their own unique id which is non-trivial in the existing hydra-editor code, but doable. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Accessibility fix for screen reader text in hydra-editor (#7238)
Fixes
Fixes #7238 ; refs #7238
Summary
Override hydra-editor screen reader text to "this" for accessibility
Guidance for testing, such as acceptance criteria or new user interface behaviors:
Type of change (for release notes)
notes-bugfixBug FixesDetailed Description
This PR adds a JavaScript override to update the screen reader text for the remove button in hydra-editor fields. Previously, the text read "previous", which was confusing for users relying on assistive technology. The override changes the text to "this" for clarity and improved accessibility.
The change is implemented in
app/assets/javascripts/hyrax/hydra_editor_override.jsand loaded via the asset pipeline. No changes were made to the hydra-editor gem itself.Changes proposed in this pull request:
hyrax/hydra_editor_override.jsto override screen reader text@samvera/hyrax-code-reviewers