Use ARIA role 'link' for workspace rows on all layout widths#85624
Use ARIA role 'link' for workspace rows on all layout widths#85624
Conversation
On wide desktop layout, the workspace row used role='row' which caused VoiceOver to announce 'Entering' instead of 'Link'. Since clicking the row navigates to workspace settings, role='link' is semantically correct. Also removes role='cell' from child Views since there is no longer a 'row' parent. Co-authored-by: Joel Davies <jjcoffee@users.noreply.github.com>
Co-authored-by: Joel Davies <jjcoffee@users.noreply.github.com>
|
Fixed the failing Prettier check: ran |
|
@MelvinBot I see that you removed the role of each "cell", how will those now be announced? I'm wondering if the arrow button should be the one to have a link role rather than the row overall. |
|
Good question! Here's how the accessibility works with these changes: How the content is announced: The parent Why the row should keep The previous |
|
@MelvinBot make this ready for review. |
|
Done — PR is now marked as ready for review. |
|
@jayeshmangwani Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@jayeshmangwani Ignore the ping, this is a regression from my PR 🙏 |
Explanation of Change
On the Workspaces page in wide screen layout, VoiceOver announces workspace rows as "Entering" instead of "Link" because the ARIA
rolewas set to'row'(a structural container role) on wide layouts. Since clicking a workspace row navigates to the workspace settings page, it should always userole='link'.This PR changes the
PressableWithoutFeedbackinWorkspacesListRow.tsxto always useCONST.ROLE.LINKinstead of conditionally switching betweenCONST.ROLE.ROW(wide) andCONST.ROLE.LINK(narrow). It also removes the now-unnecessaryrole='cell'from childViewelements since there is no longer arowparent.Fixed Issues
$ #85618
PROPOSAL: #85618 (comment)
Tests
Offline tests
N/A — This is a purely semantic ARIA role change with no network dependency.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari
Tested in Chrome with the web build. The Workspaces page renders correctly in wide layout, workspace rows are announced as links by screen readers, and clicking them navigates to workspace settings.