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
264 stars 156 forks source link

[web-components]: Blue border on hamburger menu first element #11379

Open NicoletaBordea opened 8 months ago

NicoletaBordea commented 8 months ago

Description

the first item in the hamburger menu is highlighted with a blue border image

In our project this is visible from the first click on the hamburger menu, but on the codepen example and in the demo links for masthead, in the documentation, it can be reproduced only on the second time you open the hamburger menu.

Component(s) impacted

masthead hamburger menu

Browser

Chrome

Carbon for IBM.com version

v2.1.0-rc.0

Severity

Severity 4 = The problem is not visible to or noticeable to an average user. Affects minor functionality, no workaround needed.

Application/website

ibm docs

Package

@carbon/ibmdotcom-web-components

CodeSandbox example

https://codepen.io/jakaeser/pen/gOqErGE

Steps to reproduce the issue (if applicable)

  1. resize the window for a smaller resolution, until you have the hamburger menu visible in the masthead.
  2. open the hamburger menu: nothing is highlighted
  3. Close the hamburger menu and reopen it again: first item in the menu has a blue border

In our project, this highlight is visible from the first time the hamburger menu is opened

Release date (if applicable)

No response

Code of Conduct

annawen1 commented 6 months ago

This is a accessibility feature where when the menu is open, focus should be applied to the first menu item to make the menu keyboard accessible. This is intended, so this ticket does reveal an issue where the first menu item isn't being focused on open consistently

https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/