Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: forward tabindex attribute to focusElement #3416

Merged
merged 4 commits into from
Feb 11, 2022

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Feb 10, 2022

Description

Re-introduced logic to forward tabindex attribute to DelegateFocusMixin for handling tabindex="-1" on the host.

This PR also changes how tabindex property is defined:

  • In TabindexMixin we set default value to 0 for components without focusElement such as vaadin-button
  • In DelegateFocusMixin we reset value to undefined because we don't want host element to be focusable
  • In ShadowFocusMixin we have to set value back to 0 to forward into shadow DOM for vaadin-details

Fixes vaadin/flow-components#2455

Type of change

  • Bugfix (BFP)

@web-padawan web-padawan added the a11y Accessibility issue label Feb 10, 2022
@web-padawan web-padawan force-pushed the fix/forward-tabindex branch 2 times, most recently from e49e92f to 9266dde Compare February 10, 2022 10:27
@sonarcloud
Copy link

sonarcloud bot commented Feb 11, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with platform 23.0.0.beta2 and is also targeting the upcoming stable 23.0.0 version.

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

Successfully merging this pull request may close these issues.

Vaadin 22: TextField with tabIndex=-1 not working in Dialog
3 participants