Override hydra-editor screen reader text to 'this field' for accessib…#7291
Override hydra-editor screen reader text to 'this field' for accessib…#7291trmccormick wants to merge 1 commit into
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. |
|
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. |
orangewolf
left a comment
There was a problem hiding this comment.
@trmccormick I approved this too soon - @dlpierce makes a good point in the comments. I'm hoping its not a big lift to get this to a better state.
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