Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: role for section element with no accessible name #28

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

jlp-craigmorten
Copy link
Contributor

Changes

Relates to #25

Updates the role returned for a section element to be either:

  1. region when the element has an accessible name;
  2. generic otherwise.

How to Review

Mirrors the existing functionality and tests for the img element which has similar behaviours.

According to specification a title attribute can also be used for the accessible name - I have opted to follow precedent set by the img behaviour to not include this (indeed there is prior art for ignoring the title attribute in other pages IIRC as something seen as poor practice).

Checklist

  • Unit tests updated

Copy link
Owner

@drwpow drwpow left a comment

Choose a reason for hiding this comment

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

Wonderful, thank you! Thanks for the added details of comment and test cleanups too. Much appreciated. No notes 🙂

@drwpow drwpow merged commit bbd21ac into drwpow:main Jan 25, 2025
6 checks passed
@github-actions github-actions bot mentioned this pull request Jan 25, 2025
@jlp-craigmorten jlp-craigmorten deleted the fix-section-no-name branch January 25, 2025 15:28
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