Skip to content

bug: adding aria labels to host and input element inside shadow root causes issues with nvda #23213

Closed
@mwcampbell

Description

@mwcampbell

Ionic version:

[ ] 4.x
[x] 5.x

I'm submitting a ...

[x] bug report
[ ] feature request

Current behavior:
The ion-toggle component sets ARIA attributes, such as role and aria-checked, on both the checkbox input element and its container. This means there's more than one switch in the accessibility tree, and only the inner switch can actually receive focus or otherwise handle programmatic interaction from assistive technologies.

Expected behavior:
Only the checkbox input element should have these ARIA attributes. The container should have no ARIA attributes, like most HTML container elements.

Steps to reproduce:
This issue can be seen on the online documentation page for the ion-toggle component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a11yAccessibility related issuespackage: core@ionic/core packagetype: buga confirmed bug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions