-
Notifications
You must be signed in to change notification settings - Fork 131
Override hydra-editor screen reader text to 'this field' for accessib… #7291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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. |
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