Repository navigation
[@mantine/dates] DatePickerInput, MonthPickerInput, YearPickerInput, DateTimePicker: Fix dropdown aria-labelledby referencing a missing element - #9390
Open
kammeph wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…DateTimePicker: Fix dropdown aria-labelledby referencing a missing element
kammeph
force-pushed
the
fix/date-picker-dropdown-name
branch
from
November 9, 2026 07:13
9e5cf67 to
b2ede18
Compare
Member
|
🤖 Beep boop, Codex (GPT-6 Sol) speaking! Pull request is perfect, no changes needed! Verified label added. Verified commit: Please do not update PR after it got verified, I will need to run verification again if you do that. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
The dropdown of
DatePickerInput,MonthPickerInput,YearPickerInputandDateTimePickerhasrole="dialog"andaria-labelledbyset to the Popover target id.PickerInputBasedoes not pass anidtoPopover, so the Popover generates its own id.Inputthen takes its id from theInput.Wrappercontext, which is a different generated id. The dialog'saria-labelledbytherefore points to an element that does not exist, the dialog has no accessible name, and axe reportsaria-dialog-name.Fix
Generate the id once in
PickerInputBasewithuseId(inputProps.id)and pass it to bothInput.WrapperandPopover. The input button, the labelforattribute and the dialog'saria-labelledbynow share one id, so the dialog is named after the input label. A user-suppliedidis still used as is. This matches howSelectandAutocompleteshare_id.With
dropdownType="modal"the dialog has no accessible name either.ModalBaseContentsetsaria-labelledbyonly from a mountedModal.Title, so a fix there needs a change in@mantine/core. I left it out of this PR.Testing
PickerInputBase.test.tsx:labels the dropdown with the input labelandlabels the dropdown with the input label when id is set. Both fail on master (no dialog namedtest-label) and pass with the fix.npm testpasses.