Skip to content

Add aria-pressed to RichText text formatting buttons - #2126

Merged
joelfmrodrigues merged 1 commit into
pnp:devfrom
jtlivio:fix/richtext-toolbar-aria-pressed
Sep 4, 2026
Merged

joelfmrodrigues merged 1 commit into
pnp:devfrom
jtlivio:fix/richtext-toolbar-aria-pressed

Conversation

@jtlivio

@jtlivio jtlivio commented Jul 27, 2026

Copy link
Copy Markdown
Contributor
Q A
Bug fix? [x]
New feature? [ ]
New sample? [ ]
Related issues? fixes #1945

What's in this Pull Request?

The Bold, Italic, Underline, and Link buttons pass checked to Fluent UI's
IconButton without toggle. aria-pressed is only rendered when toggle
is set, so screen readers never announce whether a format is active. Since
checked reflects the active formatting state at the current selection,
adding toggle ensures that aria-pressed is exposed correctly for all four
buttons.

Added regression coverage for Bold, Italic, Underline, and Link, verifying that
each button exposes aria-pressed="false" in its inactive state.

The new tests fail without the fix. npm run build passes with no new warnings.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the first contribution to this project.

@joelfmrodrigues
joelfmrodrigues merged commit 0651393 into pnp:dev Sep 4, 2026
1 check passed
@joelfmrodrigues

Copy link
Copy Markdown
Collaborator

@jtlivio many thanks! Merged

@joelfmrodrigues joelfmrodrigues added this to the 3.26.0 milestone Sep 4, 2026
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.

2 participants