Skip to content

fix!: set correct role attribute on the list-box and item - #5401

Merged
web-padawan merged 3 commits into
masterfrom
refactor/list-box-role
Jan 26, 2023
Merged

web-padawan merged 3 commits into
masterfrom
refactor/list-box-role

Conversation

@web-padawan

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

Copy link
Copy Markdown
Member

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

@web-padawan
web-padawan force-pushed the refactor/list-box-role branch from 9eb956e to 3464849 Compare January 26, 2023 10:37
Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

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
Copy Markdown
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