Skip to content

SITES-41121 Screen reader announces component name and an invisible group name#406

Merged
StoianLucian merged 1 commit intoadobe:masterfrom
mariang-ens:issue/SITES-41121-master
Mar 17, 2026
Merged

SITES-41121 Screen reader announces component name and an invisible group name#406
StoianLucian merged 1 commit intoadobe:masterfrom
mariang-ens:issue/SITES-41121-master

Conversation

@mariang-ens
Copy link
Copy Markdown
Contributor

@mariang-ens mariang-ens commented Feb 26, 2026

Description

JIRA Ticket: https://jira.corp.adobe.com/browse/SITES-41121

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Before the fix:

Screen.Recording.2026-02-27.at.13.55.28.mov

After the fix:

Screen.Recording.2026-02-27.at.13.45.15.mov

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@mariang-ens
Copy link
Copy Markdown
Contributor Author

This PR makes all keyboard accessible tags not accessible in order to prevent being focusable with TAB key when parent item is not focused

if (element instanceof HTMLElement) {
element.setAttribute("tabindex", value);
const el = element.querySelectorAll("button:not([hidden])");
const buttonArray = Array.from(el).filter(item => item.offsetParent);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we use “offsetParent === null” as “treat as hidden / skip.”? are we sure that if offsetParent is null, does it means hidden?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's basically the same logic as the one on line 205 (this.items._getSelectableItems().filter(item => !item.hasAttribute('hidden') && item.offsetParent);)
filter(el => el.offsetParent) = elements that are display:none, or in our case, which are hidden

@StoianLucian StoianLucian requested a review from surajmall March 17, 2026 06:48
@StoianLucian StoianLucian merged commit cb18fd3 into adobe:master Mar 17, 2026
3 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 4.21.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants