Skip to content

fix(ui): add ARIA attributes to access policy action toggle - #6882

Merged
otavio merged 1 commit into
masterfrom
fix/ui/access-policies-action-a11y
Aug 11, 2026
Merged

fix(ui): add ARIA attributes to access policy action toggle#6882
otavio merged 1 commit into
masterfrom
fix/ui/access-policies-action-a11y

Conversation

@luizhf42

Copy link
Copy Markdown
Member

What

The allow/deny toggle in the access policy drawer is now accessible to screen readers.

Why

The toggle used two plain <button> elements with no grouping or pressed-state semantics. A screen reader saw two unrelated buttons with no way to tell which was active — selection was conveyed only through color (green/red), violating WCAG 1.4.1.

Changes

  • AccessPolicyDrawer: added role="group" and aria-label="Policy action" on the wrapper so assistive tech identifies the buttons as a related set, and aria-pressed on each button so the active option is programmatically exposed.

Add `role="group"` with `aria-label` on the wrapper and `aria-pressed`
on each button so screen readers announce the group context and which
option is currently selected.
@luizhf42
luizhf42 requested a review from a team as a code owner August 11, 2026 12:13
@luizhf42 luizhf42 self-assigned this Aug 11, 2026
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown

Claude finished @luizhf42's task in 28s —— View job


Code Review Complete

Reviewed 1 file across code quality, security, testing, language patterns, and architecture — no new issues found. The code looks good as-is.

The added role="group", aria-label, and aria-pressed attributes are valid and correctly expose the active toggle option to assistive technology.

If you push additional changes and want a new review, tag @shellhub-io/admin and a team member can trigger it.
· fix/ui/access-policies-action-a11y

@otavio
otavio merged commit 54ca666 into master Aug 11, 2026
50 of 70 checks passed
@otavio
otavio deleted the fix/ui/access-policies-action-a11y branch August 11, 2026 12:44
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.

2 participants