adobe / spectrum-web-components

Spectrum Web Components
https://opensource.adobe.com/spectrum-web-components/
Apache License 2.0
1.21k stars 192 forks source link

[Bug]: Screen Readers doesnt pick up `sp-progressbar` #4515

Closed Rajdeepc closed 1 month ago

Rajdeepc commented 1 month ago

Code of conduct

Impacted component(s)

Progress-bar

Expected behavior

On tab stop on sp-progressbar, screen readers should be able to pickup the element content

Actual behavior

No tab stop on sp-progressbar

Screenshots

No response

What browsers are you seeing the problem in?

Firefox, Chrome, Safari, Microsoft Edge

How can we reproduce this issue?

  1. Go to https://opensource.adobe.com/spectrum-web-components/storybook/index.html?path=/story/progress-bar--label
  2. Click on Tab
  3. Open Voice Over Utility
  4. try to focus on the Progressbar
  5. See it cannot be focussed

Sample code that illustrates the problem

protected override firstUpdated(changes: PropertyValues): void {
    super.firstUpdated(changes);
    if (!this.hasAttribute('role')) {
        this.setAttribute('role', 'progressbar');
    }
   // this needs to be added
    if (!this.hasAttribute('tabindex')) {
        this.setAttribute('tabindex', '0');
    }
}

Logs taken while reproducing problem

No response

nikkimk commented 1 month ago

@Rajdeepc this should be done with aria-live not a tabindex as progressbars are not interactive

Rajdeepc commented 1 month ago

Closing this since aria-live should take care of this! https://www.magentaa11y.com/checklist-web/progress/