Repository navigation
[TR] A11y: Clear purpose & user instructions: Editable Risk Profile form unconditionally announces "View information (read-only)" via visually-hidden text on the Risk Assessment page - #1681
Open
sofyakurilova wants to merge 1 commit into
Conversation
- Replace the hidden `<span id="form-accessible-title">` in `ProfileFormComponent`, which always read "View information (read-only)", with a visually hidden `<h2>` whose text reflects the form's actual mode: "Create risk profile" (new profile or unsaved copy), "Edit risk profile" (draft or valid profile), or "View information (read-only)" (expired profile). - Always reference the heading from `<form class="profile-form">` via `aria-labelledby`, instead of only for expired profiles, so the form is exposed as a named form landmark. - Add an `isReadOnly` getter and use it for the heading text, the `profile-form-outdated` class, the form `tabindex`, and the delayed enable/disable of the controls, so the announced mode always matches the controls' disabled state. - Add unit tests covering the heading semantics and `aria-labelledby` link, the title for new, copied, valid, draft, and expired profiles, and "read-only" being announced only when the controls are disabled.
This branch has not been deployed
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.
fix(ui): stop announcing editable risk profile form as read-only
<span id="form-accessible-title">inProfileFormComponent, which always read "View information (read-only)", with a visually hidden<h2>whose text reflects the form's actual mode: "Create risk profile" (new profile or unsaved copy), "Edit risk profile" (draft or valid profile), or "View information (read-only)" (expired profile).<form class="profile-form">viaaria-labelledby, instead of only for expired profiles, so the form is exposed as a named form landmark.isReadOnlygetter and use it for the heading text, theprofile-form-outdatedclass, the formtabindex, and the delayed enable/disable of the controls, so the announced mode always matches the controls' disabled state.aria-labelledbylink, the title for new, copied, valid, draft, and expired profiles, and "read-only" being announced only when the controls are disabled.