Skip to content

fix(ui5-select): remove focus outline from input when dropdown is opened#13643

Merged
plamenivanov91 merged 4 commits into
mainfrom
select-double-focus-fix
Jun 5, 2026
Merged

fix(ui5-select): remove focus outline from input when dropdown is opened#13643
plamenivanov91 merged 4 commits into
mainfrom
select-double-focus-fix

Conversation

@plamenivanov91
Copy link
Copy Markdown
Contributor

When the Select dropdown is activated, the focus should only be on the selected list item, not on the input element. Previously, both the input and the selected item showed focus indicators, violating accessibility standards for single focus.

Hide the focus pseudo-element on the input when the popover is opened, ensuring only the selected item in the dropdown shows a focus indicator.

  • Modified Select.css to remove focus outline when [opened] attribute is set
  • Added accessibility test to verify focus behavior
  • All 68 Select tests pass

Fixes: #13616

When the Select dropdown is activated, the focus should only be on the
selected list item, not on the input element. Previously, both the input
and the selected item showed focus indicators, violating accessibility
standards for single focus.

Hide the focus pseudo-element on the input when the popover is opened,
ensuring only the selected item in the dropdown shows a focus indicator.

- Modified Select.css to remove focus outline when [opened] attribute is set
- Added accessibility test to verify focus behavior
- All 68 Select tests pass

Fixes: #13616
@sap-ui5-webcomponents-release
Copy link
Copy Markdown

sap-ui5-webcomponents-release Bot commented Jun 4, 2026

@kgogov kgogov self-requested a review June 5, 2026 07:02
Copy link
Copy Markdown
Contributor

@kgogov kgogov left a comment

Choose a reason for hiding this comment

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

The CSS change is correct and verified — computed styles confirm border-style: none / border-width: 0px on the ::after when opened, and visual inspection shows a single focus indicator on the selected list item only. Two issues need to be addressed before this is ready to merge.

Comment thread packages/main/cypress/specs/Select.cy.tsx Outdated
Comment thread packages/main/src/themes/Select.css Outdated
Comment thread packages/main/src/themes/Select.css Outdated
Copy link
Copy Markdown
Contributor

@kgogov kgogov left a comment

Choose a reason for hiding this comment

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

All findings addressed. The CSS fix is correct (content: none cleanly suppresses the pseudo-element), dead code removed, and the test now properly verifies both the computed style and focus placement. LGTM 🟢

@plamenivanov91 plamenivanov91 merged commit 2786b28 into main Jun 5, 2026
12 checks passed
@plamenivanov91 plamenivanov91 deleted the select-double-focus-fix branch June 5, 2026 14:07
@sap-ui5-webcomponents-release
Copy link
Copy Markdown

🧹 Preview deployment cleaned up: https://pr-13643--ui5-webcomponents.netlify.app

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Select][Web Components][2.22.0] Double Focus

2 participants