carbon-design-system / carbon-for-ibm-dotcom

Carbon for IBM.com is based on the Carbon Design System for IBM
https://www.ibm.com/standards/carbon/
Apache License 2.0
268 stars 156 forks source link

[Locale Modale]: Web Components - VO - Focus trapping not working in mobile #8146

Closed annawen1 closed 2 years ago

annawen1 commented 2 years ago

Engineering info:


Description

Focus trapping is not working for the locale modal in mobile.

One thing to try is to change the sentinel nodes to button elements instead of anchor elements as done in: https://github.com/carbon-design-system/carbon-for-ibm-dotcom/pull/8074. This would have to be done in the carbon-web-components modal component as locale modal is extending that.

https://user-images.githubusercontent.com/54281166/150870389-0e73f33a-66dc-4045-9021-2c20f3c6b98e.mov

Component(s) impacted

Locale Modal

Browser

Safari

Carbon for IBM.com version

1.30.0-rc.1

Severity

Severity 2 = Aspects of design is broken, and impedes users in a significant way, but there is a way to complete their tasks. Affects major functionality, has a workaround.

Application/website

https://www.ibm.com/standards/carbon/web-components/?path=/story/components-locale-modal--default

Package

@carbon/ibmdotcom-web-components

Code of Conduct

andy-blum commented 2 years ago

@annawen1 is this ticket needed for the same sprint as #8086?

annawen1 commented 2 years ago

@andy-blum nope, this ticket is being treated separately! This one isn't going into this upcoming release so we can schedule this in for the next sprint.

andy-blum commented 2 years ago

Additional accessibility concerns regarding the locale modal:

DDSRegionItem components are rendering links instead of buttons

Screen Shot 2022-01-26 at 10 51 36 AM

The focus trap doesn't navigate the same forwards as it does backwards

Screen Shot 2022-01-26 at 10 54 34 AM

Cycling the elements forwards and backwards should include all items, currently cycling forwards does not include the close button, which could lead visually impaired users to assume there is no close button.

This is coming from the way we're collecting all focusable elements and always putting elements in the shadowRoot behind lightDOM children

DDSLocaleSearch has some problems of its own

proeung commented 2 years ago

@andy-blum Since you already looked into this issue. Do you want to grab this one?