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!: set correct role attribute on the list-box and item #5401

Merged
merged 3 commits into from
Jan 26, 2023

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Jan 26, 2023

Description

Fixes #154
Fixes #5378

  1. Changed the default role attribute for vaadin-list-box element from list to listbox;
  2. Updated the vaadin-item to set role="option" instead of expecting the list-box to set it;
  3. Added missing logic to toggle aria-multiselectable attribute to MultiSelectListMixin;
  4. Updated vaadin-avatar-group and vaadin-select that use list-box and item accordingly;
  5. Fixed vaadin-select to remove role attribute and aria-selected from the cloned item;
  6. Added missing snapshot tests for the item and list-box, removed some existing unit tests.

Type of change

  • Behavior altering fix

Screen readers

VoiceOver + Chrome

Before (broken)

Screenshot 2023-01-26 at 11 01 17

After (working)

Two announcements: "not selected" for the item and "selected" for the list-box:

Screenshot 2023-01-26 at 11 19 36

NVDA + Edge

New behavior (after) - didn't check the old one:

Screenshot 2023-01-26 at 11 11 19

JAWS + Edge

Nnew behavior (after) - didn't check the old one:

Screenshot 2023-01-26 at 12 00 10

Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Jan 26, 2023

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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@web-padawan web-padawan removed the request for review from tomivirkki January 26, 2023 11:17
@web-padawan web-padawan merged commit 78038f3 into master Jan 26, 2023
@web-padawan web-padawan deleted the refactor/list-box-role branch January 26, 2023 11:17
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.0.0.alpha10 and is also targeting the upcoming stable 24.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.

[list-box] Incorrect item announcements when using mutiple mode list-box: missing roles and properties
3 participants