mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
fix(docs): button a11y enhancements (#49952)
## What kind of change does this PR introduce? bug fix for accessibility, fixes [docs-1265](https://linear.app/supabase/issue/DOCS-1365/add-aria-label-to-icon-only-buttons-button-name) ## What is the current behavior? some controles in the docs app have no accessible name, so screen readers announce them as an unlabelled "button" ## What is the new behavior? - adds each control a name the way its neighbours already do - adds menu toggle a state-dependent `aria-label` and `aria-expanded` - adds `button-name` to `enforced_rules` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Accessibility** - Added descriptive labels to configuration selectors and mobile menu controls. - Mobile menu controls now announce whether the menu is open or closed. - Expanded accessibility validation to check button names across documentation pages. - **UI Improvements** - Updated the raw throughput table control with a clearer button appearance and expandable chevron indicator. - Replaced a schema-migration tooltip with a direct in-page link. - **Documentation** - Removed the Info Tooltip component guidance from the contributing documentation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
1 parent
c1df3711a6
commit
085d218bff
8 files changed
+18
-157
No files matched your search
@@ -5,7 +5,7 @@ import { scan } from '../../shared/axe.ts'
|
||||
|
||||
export const WCAG_TAGS = ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']
|
||||
|
||||
export const ENFORCED_RULES = ['heading-order', 'page-has-heading-one']
|
||||
export const ENFORCED_RULES = ['heading-order', 'page-has-heading-one', 'button-name']
|
||||
|
||||
export const EXCLUDED_RULES = [
|
||||
'color-contrast',
|
||||
@@ -40,7 +40,7 @@ export async function scanArticle(
|
||||
include: string
|
||||
): Promise<A11yScanResult> {
|
||||
const reported = await scan(page, { tags: WCAG_TAGS, excludeRules: EXCLUDED_RULES, include })
|
||||
const enforced = await scan(page, { rules: ENFORCED_RULES, include })
|
||||
const enforced = await scan(page, { rules: ENFORCED_RULES })
|
||||
|
||||
const byRule = new Map([...reported, ...enforced].map((violation) => [violation.id, violation]))
|
||||
|
||||
|
||||
Reference in new issue
Block a user