Skip to content

Language switcher: remove listbox role #394

@mfranzke

Description

@mfranzke

We should remove provide another possibility besides defining the listbox role from on our language switcher component, as ARIA doesn't allow an interactive element (in our case the links) within a listbox). In between the two options (either remove listbox or only use click-events on the list items), we should target the easy and standard way here by providing regular hyperlinks. It should always be recommended to use hyperlinks for URL addressable assets like pages in another language, but there might be reasons where you need a button like within SPAs, so we provide both possibilities to set up this component.

Actually pa11y doesn't report a problem on this one, but axe does.

Successor: db-ui/elements#1221

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions