-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Combobox: Fixes multiselect selected values not being read #11436
Conversation
Asset size changes
Over Tolerance (1024 B) Over Baseline Below Baseline New Removed 1 kB = 1000 B Baseline commit: 2150212f54760164dd08b3781f80c3ecfad6ca14 (build) |
change/office-ui-fabric-react-2019-12-11-14-23-30-combobox-access.json
Outdated
Show resolved
Hide resolved
packages/office-ui-fabric-react/src/components/ComboBox/ComboBox.tsx
Outdated
Show resolved
Hide resolved
packages/office-ui-fabric-react/src/components/ComboBox/ComboBox.tsx
Outdated
Show resolved
Hide resolved
} = this.props; | ||
const { isOpen, focused, suggestedDisplayValue } = this.state; | ||
this._currentVisibleValue = this._getVisibleValue(); | ||
const multiselectPlaceholder = multiSelect | ||
? this._getMultiselectDisplayString(this.state.selectedIndices, this.state.currentOptions, suggestedDisplayValue) | ||
: ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
''; [](start = 8, length = 3)
Should this be set to undefined
instead of an empty string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. I'll change it and see.
packages/office-ui-fabric-react/src/components/ComboBox/ComboBox.tsx
Outdated
Show resolved
Hide resolved
Does this fn (and where it's called) still need to be in the code? Refers to: packages/office-ui-fabric-react/src/components/ComboBox/ComboBox.tsx:2130 in 0c5019f. [](commit_id = 0c5019f, deletion_comment = False) |
This is slightly scary... but I trust your validation :) |
packages/office-ui-fabric-react/src/components/ComboBox/ComboBox.test.tsx
Show resolved
Hide resolved
packages/office-ui-fabric-react/src/components/ComboBox/ComboBox.test.tsx
Show resolved
Hide resolved
I'm having a little trouble finding what you're referencing here. Could you point me to it? |
(I selected the code and commented, it seems to have just chosen the last line...) This is referring to the _removeZeroWidthSpaces function |
packages/office-ui-fabric-react/src/components/ComboBox/ComboBox.classNames.ts
Show resolved
Hide resolved
packages/office-ui-fabric-react/src/components/ComboBox/ComboBox.types.ts
Outdated
Show resolved
Hide resolved
change/office-ui-fabric-react-2019-12-11-14-23-30-combobox-access.json
Outdated
Show resolved
Hide resolved
packages/office-ui-fabric-react/src/components/ComboBox/ComboBox.tsx
Outdated
Show resolved
Hide resolved
Component Perf AnalysisNo significant results to display. All results
|
🎉 Handy links: |
Pull request checklist
Fixes ComboBox with multiple selected values are not read aloud #10718
Fixes [Accessibility][Functional]: On keyboard focus selected value disappears from the editable multiselect combo box. #11195
Fixes [Accessibility] Narrator is not announcing values of "Multi-select uncontrolled" ComboBox #10910
$ yarn change
Description of changes
This fixes 2 accessibility problems with multiselect combobox.
Focus areas to test
One big potential problem with this change is that it removes a zero width space that may have been used to help prevent bad values from being returned in onChange and fixed issue #3055. I believe it's safe to remove because I tested both locally and added a test to check for it and at no point was an incorrect value returned. Additionally the zero width space was almost always stripped out before the value could be saved so it's unlikely that users interacted/relied on it.
I verified that you can still select/save an empty value if freeform is enabled and that the combobox still interacts with an empty option correctly.
Microsoft Reviewers: Open in CodeFlow