fix(a11y): correct select chevron role and type rangepicker aria-label props - #1156
Merged
nroshan-eightfold merged 2 commits intoJul 21, 2026
Merged
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1156 +/- ##
==========================================
- Coverage 85.00% 85.00% -0.01%
==========================================
Files 1230 1230
Lines 21588 21587 -1
Branches 8209 8209
==========================================
- Hits 18351 18350 -1
Misses 3151 3151
Partials 86 86 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nroshan-eightfold
marked this pull request as ready for review
July 21, 2026 10:08
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.
SUMMARY:
Two WCAG-related accessibility fixes surfaced by the Eightfold condition / If-Then builder.
Selectchevron (WCAG 4.1.2): the dropdown toggle chevron rendered asrole="presentation"+aria-hidden="true"with anaria-label. A presentational role on a<button>strips its semantics and thearia-labelis ignored — an inconsistent state axe flags as a presentation-role conflict. Since therole="combobox"input already owns open/close (aria-expanded/aria-controls), this removesrole="presentation"and keepsaria-hidden, so the chevron is cleanly hidden from assistive tech per the combobox pattern.RangePickerdate-input aria labels (typing / DX):startDateInputAriaLabel/endDateInputAriaLabelare consumed by the internal range picker but were declared only on a local type, so they were missing from the public.d.ts. Consumers had to cast (as unknown as …) to name the start/end date inputs. They're now on the publicOcRangePickerSharedProps, so the cast can be dropped downstream.GITHUB ISSUE (Open Source Contributors)
N/A
JIRA TASK (Eightfold Employees Only):
https://eightfoldai.atlassian.net/browse/ENG-203981
CHANGE TYPE:
TEST COVERAGE:
TEST PLAN:
Issue 1 —
Selectchevron (WCAG 4.1.2)Verified in Storybook (Select → Basic) by inspecting the chevron
<button>onmainvs this branch:main/ 2.58.4):<button aria-hidden="true" role="presentation" tabindex="-1" aria-label="Toggle dropdown">— presentational role on an interactive button with an ignored label. axe flags it as 1 Incomplete ("ARIA role presentation must be removed when the element is made visible, as it is not allowed for the element").<button aria-hidden="true" tabindex="-1" aria-label="Toggle dropdown">—role="presentation"removed,aria-hiddenretained. axe: 0 violations / 0 incomplete. Therole="combobox"input remains the interaction surface.Tabskips the chevron; the combobox input opens/closes viaEnter/↓/Esc.Before:

After:

Issue 3a —
RangePickeraria-label prop typesVerified via the type system + compiled output (this is a type change, not a runtime one):
yarn typecheck→ clean. The props type-check across the codebase; onmainthey were not usable without a cast.The props are now emitted in the public
.d.ts:→
<RangePicker startDateInputAriaLabel="…" endDateInputAriaLabel="…" />now type-checks with noas unknown as …cast downstream.Regression
Selectsnapshots regenerated — the only rendered-DOM change is the removedrole="presentation"on the chevron; no behavioral change (mouseonClickand keyboard combobox interaction unchanged).