Skip to content

fix: correct accessibility issues in the button demos - #124

Merged
markdumay merged 1 commit into
mainfrom
fix/button-docs-a11y
Jul 19, 2026
Merged

fix: correct accessibility issues in the button demos#124
markdumay merged 1 commit into
mainfrom
fix/button-docs-a11y

Conversation

@markdumay

Copy link
Copy Markdown
Contributor

What

Two accessibility issues in the button docs, surfaced by the Hinode component Lighthouse sweep (pairs with gethinode/hinode#2066).

  1. Icon-only LinkedIn button had no accessible name (link-name). The "icon only" example omitted the title, so the link had no name. Added label="LinkedIn" — which also models how to label an icon-only button.

  2. Outlined-buttons example showed inaccessible colours (color-contrast). outline-warning (1.6:1), outline-info (1.9:1) and outline-light (1.1:1) render low-contrast text on the light preview background — those variants are only legible on dark backgrounds. Removed them from the outline example; all eight colours still appear in the solid Colored buttons example above, so nothing is hidden about the API.

The third finding from the sweep — a badge button's aria-label dropping the badge from the accessible name (WCAG 2.5.3) — was a theme issue and is fixed in gethinode/hinode#2066 (button.html no longer emits a redundant aria-label for buttons with visible text), so the demo needs no change.

Verification

Rebuilt the Hinode exampleSite with this branch (+ hinode#2066) swapped in and re-audited /en/docs/components/button/: accessibility 93 → 100, no failing audits (link-name, color-contrast pass; label-content-name-mismatch no longer applicable).

🤖 Generated with Claude Code

Two a11y fixes surfaced by the component Lighthouse sweep (pairs with gethinode/hinode#2066):
- The icon-only LinkedIn button had no accessible name; add label="LinkedIn" (link-name).
- The outlined-buttons example showed warning/info/light, whose text is 1.1-1.9:1 on the light
  preview (those variants are only legible on dark backgrounds). Drop them from the outline
  example; all eight colours remain in the solid 'Colored buttons' example above.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@markdumay
markdumay merged commit b697da1 into main Jul 19, 2026
8 checks passed
@markdumay

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 1.15.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

markdumay added a commit to gethinode/hinode that referenced this pull request Jul 19, 2026
….15.5

Pulls the paired accessibility fixes into the exampleSite demos: mod-blocks v2.2.6
(gethinode/mod-blocks#171, video-message message-title contrast) and mod-docs v1.15.5
(gethinode/mod-docs#124, button demo labels + outline colours). With this repo's own
button.html change, /en/docs/blocks/video-message and /en/docs/components/button both
score accessibility 100 with no failing audits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
markdumay added a commit to gethinode/hinode that referenced this pull request Jul 19, 2026
….15.5

Pulls the paired accessibility fixes into the exampleSite demos: mod-blocks v2.2.6
(gethinode/mod-blocks#171, video-message message-title contrast) and mod-docs v1.15.5
(gethinode/mod-docs#124, button demo labels + outline colours). With this repo's own
button.html change, /en/docs/blocks/video-message and /en/docs/components/button both
score accessibility 100 with no failing audits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant