You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I click in a sub element in label to focus the checkbox, the checkbox is focused with :focus-visible state. I expected it to be focused without this state (like when we click directly on the label).
What is affected?
Accessibility, Component
Description
When I click in a sub element in label to focus the checkbox, the checkbox is focused with :focus-visible state. I expected it to be focused without this state (like when we click directly on the label).
Reproduction
The checkbox must not have :focus-visible state when we click on the red span.
https://lit.dev/playground/#project=W3sibmFtZSI6InNpbXBsZS1ncmVldGluZy50cyIsImNvbnRlbnQiOiJpbXBvcnQge2h0bWwsIGNzcywgTGl0RWxlbWVudH0gZnJvbSAnbGl0JztcbmltcG9ydCB7Y3VzdG9tRWxlbWVudCwgcHJvcGVydHl9IGZyb20gJ2xpdC9kZWNvcmF0b3JzLmpzJztcbmltcG9ydCAnQG1hdGVyaWFsL3dlYi90ZXh0ZmllbGQvZmlsbGVkLXRleHQtZmllbGQuanMnO1xuaW1wb3J0ICdAbWF0ZXJpYWwvd2ViL2NoZWNrYm94L2NoZWNrYm94LmpzJztcblxuQGN1c3RvbUVsZW1lbnQoJ3NpbXBsZS1ncmVldGluZycpXG5leHBvcnQgY2xhc3MgU2ltcGxlR3JlZXRpbmcgZXh0ZW5kcyBMaXRFbGVtZW50IHtcbiAgc3RhdGljIHN0eWxlcyA9IGNzc2BcbiAgICAgIHNwYW4ge1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiByZWQ7XG4gICAgICB9XG4gIGA7XG4gIFxuICByZW5kZXIoKSB7XG4gICAgcmV0dXJuIGh0bWxgXG4gICAgICAgIDxkaXY-XG4gICAgICAgICAgPGxhYmVsPjxtZC1jaGVja2JveD48L21kLWNoZWNrYm94PkNhbiBjbGljayA8c3Bhbj53aXRoIDpmb2N1cy12aXNpYmxlPC9zcGFuPjwvbGFiZWw-XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8ZGl2PlxuICAgICAgICAgIDxsYWJlbD48bWQtZmlsbGVkLXRleHQtZmllbGQ-PC9tZC1maWxsZWQtdGV4dC1maWVsZD5DYW4gY2xpY2sgPHNwYW4-Y2FuJ3QgY2xpY2s8L3NwYW4-PC9sYWJlbD5cbiAgICAgICAgPC9kaXY-XG4gICAgYDtcbiAgfVxufVxuIn0seyJuYW1lIjoiaW5kZXguaHRtbCIsImNvbnRlbnQiOiI8IURPQ1RZUEUgaHRtbD5cbjxoZWFkPlxuICA8c2NyaXB0IHR5cGU9XCJtb2R1bGVcIiBzcmM9XCIuL3NpbXBsZS1ncmVldGluZy5qc1wiPjwvc2NyaXB0PlxuPC9oZWFkPlxuPGJvZHk-XG4gIDxzaW1wbGUtZ3JlZXRpbmcgbmFtZT1cIldvcmxkXCI-PC9zaW1wbGUtZ3JlZXRpbmc-XG48L2JvZHk-XG4ifSx7Im5hbWUiOiJwYWNrYWdlLmpzb24iLCJjb250ZW50Ijoie1xuICBcImRlcGVuZGVuY2llc1wiOiB7XG4gICAgXCJsaXRcIjogXCJeMy4wLjBcIixcbiAgICBcIkBsaXQvcmVhY3RpdmUtZWxlbWVudFwiOiBcIl4yLjAuMFwiLFxuICAgIFwibGl0LWVsZW1lbnRcIjogXCJeNC4wLjBcIixcbiAgICBcImxpdC1odG1sXCI6IFwiXjMuMC4wXCIsXG4gICAgXCJAbWF0ZXJpYWwvd2ViXCI6IFwiXjEuNS4xXCJcbiAgfVxufSJ9XQ
Workaround
No
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
Failing in 1.5.1
Browser/OS/Node environment
Chrome v. 126
The text was updated successfully, but these errors were encountered: