Skip to content

fix(select): correct markup in option group header - #8166

Open
tomdavies73 wants to merge 1 commit into
masterfrom
FE-7773
Open

fix(select): correct markup in option group header#8166
tomdavies73 wants to merge 1 commit into
masterfrom
FE-7773

Conversation

@tomdavies73

Copy link
Copy Markdown
Contributor

fix #8157

Proposed behaviour

Iinstead of rendering the option group header label as a h4 we now render a span instead. This adheres with proper HTML semantics and resolves an axe issue. Some additional styling has also been added to make sure there is no visual regression.

Current behaviour

The option group header label renders as a h4 . This does not adhere with proper HTML semantics and results in an axe issue.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

Open a story which includes an option group header on this PR and on master. Open the dropdown and run axe dev tools, on master this will result in a failure due to incorrect children, on this PR it will not.

instead of rendering the option group header label as a h4 we now render a span instead. This
adheres with proper HTML semantics and resolves an axe issue. Some additional styling has also been
added to make sure there is no visual regression

fix #8157
Comment thread src/components/select/simple-select/simple-select.pw.tsx
@tomdavies73
tomdavies73 marked this pull request as ready for review September 8, 2026 09:26
@tomdavies73
tomdavies73 requested review from a team as code owners September 8, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Filterable Select has Axe issues

3 participants