Closed dcalhoun closed 3 months ago
I noticed that when navigating inside the group that represents the tab button, the icon is accessible by screen readers
Good note. TIL that one can set the alternative text of a pseudo element by suffixing a slash and string. However, from my testing, this does not work for hiding an element from a screen reader using an empty string value. 😞
Are you able to achieve a different outcome where the tab icon is hidden from the screen reader?
Are you able to achieve a different outcome where the tab icon is hidden from the screen reader?
I haven't managed to hide it from the screen reader. I tried to render the icon in a different way by using the icon
tab property, but the component only renders the icon in that case (reference).
Not sure if it would be feasible but I wonder if we could use isAccessibilitySupportEnabled
to determine when to apply the class name components-tab-panel__tabs--assistant
that renders the icon.
Not sure if it would be feasible but I wonder if we could use
isAccessibilitySupportEnabled
to determine when to apply the class namecomponents-tab-panel__tabs--assistant
that renders the icon.
A good idea. I'm not sure the impact warrants the complexity, currently. My suggestion would be to either:
A. Leave it as-is, considering it low-impact;
B. Or adding a descriptive alternative text, e.g., Studio Assistant icon
.
Would you be fine with either of those? If so, do you have a preference?
Would you be fine with either of those? If so, do you have a preference?
Yeah, let's keep it as-is. I don't think it will have a major impact in a11y.
Fixes https://github.com/Automattic/dotcom-forge/issues/7520.
Proposed Changes
Hide decorative AI assistant icon from screen readers Selecting this description-less, decorative image provides little value for users.
Communicate message author to screen readers Navigating individual lines of text from a back-and-forth conversation is difficult and overwhelming when there are not discernible, navigable grouping or message author labels.
Communicate the active assistant "thinking" to screen readers Without a label, there is no indication that the assistant is actively working to answer a message.
Testing Instructions
Decorative assistant icon is not selectable
Message collection navigation is straightforward and comprehensible
Pre-merge Checklist