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: ContextualMenuSplitButton always sets aria-checked (does not leave it undefined) when it is checkable #27650

Merged

Conversation

khmakoto
Copy link
Member

@khmakoto khmakoto commented Apr 20, 2023

Previous Behavior

Checkable split buttons inside of contextual menus are not setting aria-checked when neither isChecked nor checked are passed in. aria-checked should be set to false if neither isChecked nor checked are passed in.

New Behavior

Checkable split buttons inside of contextual menus now set aria-checked to false when neither isChecked nor checked are passed in. We're also now using the getIsChecked function to determine that since that is what is used at the end to determine if the split button is checkable or not.

Related Issue(s)

@khmakoto khmakoto requested review from a team as code owners April 20, 2023 19:03
@khmakoto khmakoto self-assigned this Apr 20, 2023
@github-actions github-actions bot added this to the April Project Cycle Q2 2023 milestone Apr 20, 2023
@codesandbox-ci
Copy link

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.

Latest deployment of this branch, based on commit dd5e83e:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@size-auditor
Copy link

size-auditor bot commented Apr 20, 2023

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react fluentui-react-Dialog 199.141 kB 199.166 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-Breadcrumb 190.362 kB 190.387 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-Nav 177.796 kB 177.821 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-Panel 188.818 kB 188.843 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-Pickers 280.474 kB 280.499 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-Pivot 178.635 kB 178.66 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-Grid 170.487 kB 170.512 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-SearchBox 177.458 kB 177.483 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-SelectedItemsList 220.951 kB 220.976 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-FloatingPicker 230.507 kB 230.532 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-Facepile 200.22 kB 200.245 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-SpinButton 181.203 kB 181.228 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-Dropdown 221.031 kB 221.056 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-DocumentCard 205.183 kB 205.208 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-MessageBar 178.762 kB 178.787 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-SwatchColorPicker 180.179 kB 180.204 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-TimePicker 227.278 kB 227.303 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-TeachingBubble 194.017 kB 194.042 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-Button 184.674 kB 184.699 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-CommandBar 191.393 kB 191.418 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-ComboBox 238.348 kB 238.373 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-ButtonGrid 170.487 kB 170.512 kB ExceedsBaseline     25 bytes
office-ui-fabric-react fluentui-react-ContextualMenu 145.746 kB 145.771 kB ExceedsBaseline     25 bytes

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: bb8dfe06f4f2910eef1561c76410bf91b009fa37 (build)

@fabricteam
Copy link
Collaborator

📊 Bundle size report

🤖 This report was generated against bb8dfe06f4f2910eef1561c76410bf91b009fa37

@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 792 773 5000
Breadcrumb mount 2028 2032 1000
Checkbox mount 2083 2102 5000
CheckboxBase mount 1854 1857 5000
ChoiceGroup mount 3503 3499 5000
ComboBox mount 796 803 1000
CommandBar mount 7645 7693 1000
ContextualMenu mount 12852 13058 1000
DefaultButton mount 948 926 5000
DetailsRow mount 2620 2617 5000
DetailsRowFast mount 2642 2609 5000
DetailsRowNoStyles mount 2439 2450 5000
Dialog mount 3213 3232 1000
DocumentCardTitle mount 298 285 1000
Dropdown mount 2451 2451 5000
FocusTrapZone mount 1431 1394 5000
FocusZone mount 1413 1347 5000
GroupedList mount 41293 45595 2
GroupedList virtual-rerender 22016 22104 2
GroupedList virtual-rerender-with-unmount 62606 62863 2
GroupedListV2 mount 284 295 2
GroupedListV2 virtual-rerender 264 272 2
GroupedListV2 virtual-rerender-with-unmount 280 292 2
IconButton mount 1298 1299 5000
Label mount 446 443 5000
Layer mount 3359 3358 5000
Link mount 520 530 5000
MenuButton mount 1140 1148 5000
MessageBar mount 25839 25980 5000
Nav mount 2334 2336 1000
OverflowSet mount 1022 997 5000
Panel mount 2167 2129 1000
Persona mount 921 892 1000
Pivot mount 1067 1095 1000
PrimaryButton mount 1044 1057 5000
Rating mount 5783 5797 5000
SearchBox mount 1115 1110 5000
Shimmer mount 2340 2306 5000
Slider mount 1674 1678 5000
SpinButton mount 3421 3418 5000
Spinner mount 519 520 5000
SplitButton mount 2142 2157 5000
Stack mount 541 540 5000
StackWithIntrinsicChildren mount 1084 1079 5000
StackWithTextChildren mount 3371 3391 5000
SwatchColorPicker mount 7447 7417 5000
TagPicker mount 1681 1695 5000
Text mount 490 490 5000
TextField mount 1150 1142 5000
ThemeProvider mount 1016 1019 5000
ThemeProvider virtual-rerender 796 783 5000
ThemeProvider virtual-rerender-with-unmount 1557 1563 5000
Toggle mount 782 793 5000
buttonNative mount 254 240 5000

@khmakoto khmakoto merged commit 7b7f8b9 into microsoft:master Apr 20, 2023
@khmakoto khmakoto deleted the contextualMenuSplitButtonAriaChecked branch April 20, 2023 20:44
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Apr 24, 2023
* master: (58 commits)
  fix(react-datepicker-compat): Make onValidationError onValidationResult so the error is updated when there's no longer an error (microsoft#27655)
  Fix `@fluentui/react-portal-compat`: to be compatible with React 18 (microsoft#27577)
  chore: fix versions of @fluentui/react-datepicker-compat (microsoft#27666)
  applying package updates
  applying package updates
  Make line chart screen reader accessible (microsoft#27632)
  fix(react-examples): Improve keyboard navigation in ContextualMenu.CustomMenuList (microsoft#25172)
  docs(react-textarea): Update examples to use Field (microsoft#27644)
  bugfix(react-dialog): `DialogTitle` root as `h2` by default (microsoft#27555)
  applying package updates
  chore: restructure stories, add separate category for flat tree (microsoft#27586)
  fix document link (microsoft#27499)
  fix(react): exclude React.HTMLAttributes defined `content` prop for Tooltip and TooltipHost Prop types to mitigate @types/react breaking changes (microsoft#27467)
  chore(react-tabs): adopts custom JSX pragma (microsoft#27640)
  fix: ContextualMenuSplitButton always sets aria-checked (does not leave it undefined) when it is checkable (microsoft#27650)
  feat(react-datepicker-compat): Move DatePicker compat to stable (microsoft#27378)
  bugfix(react-tree): fix parent navigation after independency from id (microsoft#27642)
  applying package updates
  feat(react-datepicker-compat): Add error handling to DatePicker and update popup's padding (microsoft#27637)
  feat(public-docsite): Add banner to React component pages to promote v9 (microsoft#27557)
  ...
marcosmoura pushed a commit to marcosmoura/fluentui that referenced this pull request Apr 25, 2023
…ve it undefined) when it is checkable (microsoft#27650)

* fix: ContextualMenuSplitButton always sets aria-checked (does not leave it undefined) when it is checkable.

* Adding change file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: FluentUI ContextualMenu Accessibility Issue aria-required-attr
3 participants