Skip to content

Conversation

@ecraig12345
Copy link
Member

@ecraig12345 ecraig12345 commented Dec 30, 2020

Pull request checklist

Description of changes

ComboBox tries to pass role="option" and some data-* props as top-level props to an option Checkbox in multi-select mode. As documented in #16307, Checkbox currently doesn't apply most native props, so these props aren't applied. This is definitely a problem (Accessibility Insights flags it) but probably got missed since none of the ComboBox examples on the website used multi-select.

Related changes:

  • Fix a minor version of this issue in Dropdown, where data-* props are passed as top-level props to the Checkbox (the more significant issue with the role had already been fixed)
  • Add multi-select ComboBox examples on the website, and fix the controlled examples to actually work with freeform mode
  • Add snapshot tests for ComboBox and Dropdown's open states

(master version: #16331)

@msft-fluent-ui-bot msft-fluent-ui-bot added the needs cherry-pick Temporary label for PRs which may need to be cherry-picked to master label Dec 30, 2020
@ecraig12345 ecraig12345 added Area: Accessibility Component: Combobox Component: Dropdown and removed needs cherry-pick Temporary label for PRs which may need to be cherry-picked to master labels Dec 30, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 30, 2020

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 ef8b9de:

Sandbox Source
Fluent UI Button Configuration
codesandbox-react-template Configuration

@fabricteam
Copy link
Collaborator

fabricteam commented Dec 31, 2020

Perf Analysis

No significant results to display.

All results

Scenario Render type 7.0 Ticks PR Ticks Iterations Status
BaseButton mount 986 985 5000
Breadcrumb mount 44779 43866 5000
Checkbox mount 1738 1749 5000
CheckboxBase mount 1434 1434 5000
ChoiceGroup mount 5449 5515 5000
ComboBox mount 962 959 1000
CommandBar mount 8066 8006 1000
ContextualMenu mount 14905 14905 1000
DefaultButton mount 1285 1233 5000
DetailsRow mount 4123 4035 5000
DetailsRowFast mount 4071 4063 5000
DetailsRowNoStyles mount 3891 3874 5000
Dialog mount 1885 1835 1000
DocumentCardTitle mount 1905 1946 1000
Dropdown mount 2734 2770 5000
FocusTrapZone mount 1846 1858 5000
FocusZone mount 1902 1941 5000
IconButton mount 1926 1996 5000
Label mount 368 345 5000
Layer mount 2134 2134 5000
Link mount 472 489 5000
MenuButton mount 1653 1659 5000
MessageBar mount 2217 2218 5000
Nav mount 3603 3601 1000
OverflowSet mount 1519 1570 5000
Panel mount 1545 1539 1000
Persona mount 867 854 1000
Pivot mount 1624 1557 1000
PrimaryButton mount 1422 1411 5000
Rating mount 8903 8765 5000
SearchBox mount 1417 1427 5000
Shimmer mount 2804 2873 5000
Slider mount 1667 1662 5000
SpinButton mount 5792 5508 5000
Spinner mount 434 434 5000
SplitButton mount 3488 3496 5000
Stack mount 544 559 5000
StackWithIntrinsicChildren mount 1942 1942 5000
StackWithTextChildren mount 5396 5395 5000
SwatchColorPicker mount 11630 11512 5000
TagPicker mount 3128 3066 5000
TeachingBubble mount 53877 53874 5000
Text mount 467 476 5000
TextField mount 1506 1497 5000
Toggle mount 895 882 5000
button mount 112 135 5000

@size-auditor
Copy link

size-auditor bot commented Dec 31, 2020

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react office-ui-fabric-react-Dropdown 228.196 kB 228.201 kB ExceedsBaseline     5 bytes
office-ui-fabric-react office-ui-fabric-react-ComboBox 241.889 kB 241.894 kB ExceedsBaseline     5 bytes

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

Baseline commit: c98610f4fc38ed65b3a0a89350970681393fb0a3 (build)

@ecraig12345 ecraig12345 force-pushed the combobox-checkbox-option-7 branch from 7a43cdd to 3aaae03 Compare June 12, 2021 01:43
@ecraig12345 ecraig12345 requested a review from a team as a code owner June 12, 2021 01:43
@ecraig12345 ecraig12345 requested a review from smhigley June 12, 2021 01:44
@ecraig12345 ecraig12345 enabled auto-merge (squash) June 12, 2021 01:45
@ecraig12345 ecraig12345 force-pushed the combobox-checkbox-option-7 branch from 3aaae03 to 4e9b8b2 Compare June 12, 2021 01:47
Copy link
Contributor

@smhigley smhigley left a comment

Choose a reason for hiding this comment

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

Just one change, otherwise it looks good!

aria-selected={isSelected ? 'true' : 'false'}
ariaLabel={item.ariaLabel}
aria-selected={isChecked ? 'true' : 'false'}
ariaLabel={this._getPreviewText(item)}
Copy link
Contributor

Choose a reason for hiding this comment

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

In this one case, I'd suggest leaving this as ariaLabel={item.ariaLabel}, since defining it as item._getPreviewText means the aria-label will always be set, even if an author hasn't defined item.ariaLabel. That actually caused an a11y bug in v8 (fixed now) when a team had different option text in the dropdown than the text used in the input value.

@msft-fluent-ui-bot
Copy link
Collaborator

Because this pull request has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

The pull request will still be available for reference. If it's still relevant to merge at some point, you can reopen or make a new version based on the latest code.

@msft-fluent-ui-bot msft-fluent-ui-bot added the Resolution: Soft Close Soft closing inactive issues over a certain period label Nov 11, 2021
auto-merge was automatically disabled November 11, 2021 18:00

Pull request was closed

@ecraig12345 ecraig12345 reopened this Nov 11, 2021
@ecraig12345 ecraig12345 removed the Resolution: Soft Close Soft closing inactive issues over a certain period label Nov 11, 2021
@ecraig12345 ecraig12345 force-pushed the combobox-checkbox-option-7 branch from 4e9b8b2 to ef8b9de Compare November 11, 2021 22:55
@ecraig12345
Copy link
Member Author

@smhigley Finally updated this--would you mind taking another look at the core ComboBox and Dropdown changes and ensuring they look correct?

@ecraig12345 ecraig12345 enabled auto-merge (squash) November 11, 2021 22:56
Copy link
Contributor

@smhigley smhigley left a comment

Choose a reason for hiding this comment

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

LGTM!

@ecraig12345 ecraig12345 merged commit cac88c0 into microsoft:7.0 Nov 29, 2021
@ecraig12345 ecraig12345 deleted the combobox-checkbox-option-7 branch November 29, 2021 22:39
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.

5 participants