Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The implementation preserves existing rendering while making decorative-image intent explicit and adequately tested.
Pull request overview
Marks five Pair2 illustrations as decorative while retaining accessible labels for meaningful images and QR codes.
Changes:
- Forces shared Pair2 illustrations into
aria-hiddenrendering. - Adds explicit coverage for decorative and labelled image exports.
- Updates Pair2 accessibility test descriptions and expectations.
File summaries
| File | Description |
|---|---|
components/images/index.tsx |
Marks five pairing illustrations decorative. |
components/images/index.test.tsx |
Tests decorative and labelled image groups. |
Pair2/Supplicant/TimeoutAndCancel/index.test.tsx |
Clarifies accessibility expectation. |
Pair2/Supplicant/SyncSuccess/index.test.tsx |
Clarifies accessibility expectation. |
Pair2/Supplicant/ReadyToScan/index.test.tsx |
Clarifies accessibility expectation. |
Pair2/Authority/TimeoutAndCancel/index.test.tsx |
Clarifies accessibility expectation. |
Pair2/Authority/SyncSuccess/index.test.tsx |
Clarifies accessibility expectation. |
Pair2/Authority/ScanQR/index.test.tsx |
Distinguishes QR labeling from decorative artwork. |
Pair2/Authority/ContinueOnMobile/index.test.tsx |
Clarifies accessibility expectation. |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
FWIW, I don't think that's what these images are doing, and there's a "user delight" angle and big screen real estate and low vision user argument. However, these are easy enough for us to add back later and it's really up to the accessibility team based on the page context. I've sent Laurel a message and if she gives the thumbs up I'm good to r+. |
@LZoog I won't land until you r+ |
LZoog
left a comment
There was a problem hiding this comment.
I'm r+'ing since you're right that it's better to have aria-hidden=true on these instead of an empty aria-label, because that'll make it read more consistently across OS/screen readers. VO on Mac skips these but it's possible another could read these as "image" with nothing else.
I think it's worth filing a follow up to have the accessibility folks look at all of our pages with images similar to this for a more official recommendation on what makes sense for user delight / low sighted users. I'm betting they'll say most should be hidden but some deserve some text. This might also be better as a Zoom call with someone on their side so we can show them Storybook pages, or something like that, but either way, I know that's low priority and we can do it at any point later. 👍
| /> | ||
| /* | ||
| * The pairing illustrations below are decorative. Every card that renders one | ||
| * states the same thing in its heading and body copy, so WCAG 1.1.1 is met |
There was a problem hiding this comment.
Just a nit pick but I think the wording in another comment, "already carry their meaning in text" is more accurate than, "Every card that renders one states the same thing in its heading and body copy." As written it just makes me think of an image with text in it that "states the same thing" but eh.
Because: - The five shared pairing illustrations landed in #20979 with placeholder labels and a TODO, pending an a11y decision. - Every card that renders one states the same thing in text, so WCAG 1.1.1 treats them as presentational. This commit: - Renders the five illustrations aria-hidden rather than relying on empty label strings falling through a falsy check. - Replaces the aria-label test's exclusion regex with a named decorative list, asserting both the hidden and the labelled images. - Corrects seven Pair2 page tests whose names and comments described the illustrations as exposed. Closes #FXA-14337
Because
This pull request
Issue that this pull request solves
Closes: FXA-14337
Checklist
Put an
xin the boxes that applyHow to review (Optional)
packages/fxa-settings/src/components/images/—index.tsxandindex.test.tsx. The other seven files change test names and comments only.components/imagesfiles, then the Pair2 page tests.aria-hiddenbranch ofPreparedImage.Screenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
SyncDevicesImageis still exposed on five Pair2 cards with a verbose label and is a candidate for the same treatment. Left alone here — it is a pre-existing translated string.