Skip to content

fix: remove aria-hidden from span helper#8569

Closed
deleonio wants to merge 1 commit intodevelopfrom
feature/implement-accessible-descriptions-for-controls
Closed

fix: remove aria-hidden from span helper#8569
deleonio wants to merge 1 commit intodevelopfrom
feature/implement-accessible-descriptions-for-controls

Conversation

@deleonio
Copy link
Copy Markdown
Contributor

Summary

  • drop the aria-hidden attribute from the KolSpan expert slot container so screen readers only pick up the hidden flag
  • refresh the affected snapshots for span, badge, button, link and tooltip to reflect the updated markup

Testing

  • pnpm --filter @public-ui/components test:unit -- --updateSnapshot

https://chatgpt.com/codex/tasks/task_e_68db17bc1f94832bb36e62d69202f741

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 188 to 190
{hasAriaDescription && (
<span class="visually-hidden" id={this.internalDescriptionById}>
<span hidden id={this.internalDescriptionById}>
{this.state._ariaDescription}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P1] Preserve aria-describedby content for screen readers

The span that contains _ariaDescription was changed from class="visually-hidden" to hidden. Because the button’s aria-describedby points at this element, setting hidden removes it from the accessibility tree and screen readers stop announcing the description whenever _ariaDescription is used. The previous visually-hidden class kept the text off-screen but still exposed to assistive tech, which is required for aria-describedby to work.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Copy Markdown
Contributor

@deleonio
Copy link
Copy Markdown
Contributor Author

#8572

@deleonio deleonio closed this Sep 30, 2025
@publicuibot publicuibot bot locked and limited conversation to collaborators Sep 30, 2025
@deleonio deleonio deleted the feature/implement-accessible-descriptions-for-controls branch December 5, 2025 01:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant