Skip to content

[docs] Make NumberField described by helper text#48257

Merged
silviuaavram merged 2 commits into
mui:masterfrom
silviuaavram:docs/number-field-description
Apr 10, 2026
Merged

[docs] Make NumberField described by helper text#48257
silviuaavram merged 2 commits into
mui:masterfrom
silviuaavram:docs/number-field-description

Conversation

@silviuaavram
Copy link
Copy Markdown
Member

@silviuaavram silviuaavram commented Apr 10, 2026

@silviuaavram silviuaavram self-assigned this Apr 10, 2026
@silviuaavram silviuaavram added docs Improvements or additions to the documentation. accessibility a11y scope: number field Changes related to the number field. labels Apr 10, 2026
Copilot AI review requested due to automatic review settings April 10, 2026 07:18
@mui-bot
Copy link
Copy Markdown

mui-bot commented Apr 10, 2026

Netlify deploy preview

https://deploy-preview-48257--material-ui.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 5521d9f

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Improves accessibility for the Number Field docs example by associating the input with its helper text via aria-describedby, so assistive technologies can announce the helper text alongside the field.

Changes:

  • Add aria-describedby on the TSX NumberField example input, pointing to helper text.
  • Add an id to the helper text element in both TSX and JS examples.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
docs/data/material/components/number-field/components/NumberField.tsx Adds aria-describedby on the input and an id on helper text to link them.
docs/data/material/components/number-field/components/NumberField.js Adds helper text id, but currently lacks the matching aria-describedby on the input.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

)}
/>
<FormHelperText sx={{ ml: 0, '&:empty': { mt: 0 } }}>
<FormHelperText id={`${id}-helper-text`} sx={{ ml: 0, '&:empty': { mt: 0 } }}>
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This file now assigns an id to the FormHelperText, but the input itself is still missing the corresponding aria-describedby attribute, so the helper text won’t be announced/associated by assistive tech in the JS example. Please add the same aria-describedby={${id}-helper-text} wiring to the OutlinedInput (as done in the TSX version) to fully achieve the PR’s goal.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

Nice! :accessibility:

@silviuaavram silviuaavram merged commit 81f4cca into mui:master Apr 10, 2026
19 checks passed
@silviuaavram silviuaavram deleted the docs/number-field-description branch April 10, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility a11y docs Improvements or additions to the documentation. scope: number field Changes related to the number field.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants