Skip to content

fix: dimmer AT firefox/macos quirks#438

Merged
pnicolli merged 4 commits into
mainfrom
fix/dimmer-a11y-firefox-60
Jun 19, 2026
Merged

fix: dimmer AT firefox/macos quirks#438
pnicolli merged 4 commits into
mainfrom
fix/dimmer-a11y-firefox-60

Conversation

@deodorhunter

Copy link
Copy Markdown
Contributor

Fixes #60 (comment): firefox/macos specific quirks in AT rendering on page load, add aria-hidden attributes alongside inert

deodorhunter and others added 3 commits June 4, 2026 14:47
…iceOver first-load reachability

On Mac/Firefox/VoiceOver, background card headings were reachable via AT
navigation on first page load when `active` was set declaratively. After
toggling off then on, the bug disappeared — confirming a timing issue.

Root cause: `_updateBackgroundInert()` applied `inert` during `slotchange`,
but child custom elements (it-card) were still upgrading their shadow DOM at
that point. Firefox's AT registered the heading links before the `inert`
constraint propagated through the fully-rendered tree.

Fix: override `firstUpdated()` to re-apply `_updateBackgroundInert()` after
one rAF, matching the AT-settlement pattern in focus-trap-controller.

Also documents BSI#1165 (upstream bootstrap-italia a11y issue) in dimmer.scss
since it cannot be addressed from this layer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…iceOver

The rAF firstUpdated workaround did not fix the issue. Root cause:
Firefox's inert implementation does not propagate through shadow DOM slot
boundaries when building its accessibility tree on first page load. inert IS
set in the DOM but Firefox VoiceOver still finds slotted <a> links inside
custom elements (e.g. it-card) because it does not walk the light DOM
ancestor chain when creating AT nodes for shadow DOM content.

aria-hidden="true" operates on the DOM tree (not the flat tree) and Firefox
has mature, correct support for it: when set on a container, it explicitly
excludes the element and all DOM-tree descendants from the accessibility tree,
including light DOM children that happen to be slotted into child custom
elements.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@deodorhunter deodorhunter self-assigned this Jun 16, 2026
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-web-components Ready Ready Preview Jun 19, 2026 10:35am

Request Review

@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d7f39d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 45 packages
Name Type
@italia/dimmer Patch
@italia/accordion Patch
@italia/autocomplete Patch
@italia/avatar Patch
@italia/back-to-top Patch
@italia/bottom-nav Patch
@italia/breadcrumbs Patch
@italia/button Patch
@italia/callout Patch
@italia/card Patch
@italia/carousel Patch
@italia/checkbox Patch
@italia/chip Patch
@italia/collapse Patch
@italia/dev-kit-italia Patch
@italia/dropdown Patch
@italia/globals Patch
@italia/header Patch
@italia/hero Patch
@italia/i18n Patch
@italia/icon Patch
@italia/input Patch
@italia/megamenu Patch
@italia/modal Patch
@italia/navscroll Patch
@italia/notification Patch
@italia/pagination Patch
@italia/popover Patch
@italia/progress Patch
@italia/radio Patch
@italia/rating Patch
@italia/section Patch
@italia/select Patch
@italia/skiplinks Patch
@italia/stepper Patch
@italia/sticky Patch
@italia/tabs Patch
@italia/timeline Patch
@italia/toggle Patch
@italia/thumbnav Patch
@italia/toolbar Patch
@italia/tooltip Patch
@italia/transfer Patch
@italia/upload Patch
@italia/video Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@giuliaghisini

Copy link
Copy Markdown
Contributor

@deodorhunter manca solo il changeset

@pnicolli pnicolli merged commit 7c794fd into main Jun 19, 2026
4 of 5 checks passed
@pnicolli pnicolli deleted the fix/dimmer-a11y-firefox-60 branch June 19, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: componente dimmer

3 participants