Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Fix ComboBox ARIA attributes.",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "jagore@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,6 @@ export class ComboBox extends BaseComponent<IComboBoxProps, IComboBoxState> {
!!hasErrorMessage
);

const describedBy = id + '-option';

return (
<div { ...divProps } ref={ this._root } className={ this._classNames.container }>
{ label && (
Expand Down Expand Up @@ -384,14 +382,13 @@ export class ComboBox extends BaseComponent<IComboBoxProps, IComboBoxState> {
aria-expanded={ isOpen }
aria-autocomplete={ this._getAriaAutoCompleteValue() }
role='combobox'
aria-readonly={ ((allowFreeform || disabled) ? undefined : 'true') }
readOnly={ disabled || !allowFreeform }
aria-labelledby={ (label && (id + '-label')) }
aria-label={ ((ariaLabel && !label) ? ariaLabel : undefined) }
aria-describedby={ describedBy + (keytipAttributes['aria-describedby'] || '') }
aria-describedby={ keytipAttributes['aria-describedby'] }
aria-activedescendant={ this._getAriaActiveDescentValue() }
aria-disabled={ disabled }
aria-owns={ (id + '-list') }
aria-owns={ isOpen ? (id + '-list') : undefined }
spellCheck={ false }
defaultVisibleValue={ this._currentVisibleValue }
suggestedDisplayValue={ suggestedDisplayValue }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,12 @@ exports[`ComboBox Renders ComboBox correctly 1`] = `
<input
aria-activedescendant={undefined}
aria-autocomplete="both"
aria-describedby="ComboBox0-option"
aria-describedby={undefined}
aria-disabled={undefined}
aria-expanded={false}
aria-label={undefined}
aria-labelledby={undefined}
aria-owns="ComboBox0-list"
aria-readonly="true"
aria-owns={undefined}
autoCapitalize="off"
autoComplete="off"
className=
Expand Down Expand Up @@ -397,13 +396,12 @@ exports[`ComboBox renders a ComboBox with a Keytip correctly 1`] = `
<input
aria-activedescendant={undefined}
aria-autocomplete="both"
aria-describedby="ComboBox4-option ktp-layer-id ktp-a"
aria-describedby=" ktp-layer-id ktp-a"
aria-disabled={undefined}
aria-expanded={false}
aria-label={undefined}
aria-labelledby={undefined}
aria-owns="ComboBox4-list"
aria-readonly="true"
aria-owns={undefined}
autoCapitalize="off"
autoComplete="off"
className=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,12 @@ exports[`ComboBox Renders ComboBox correctly 1`] = `
<input
aria-activedescendant={undefined}
aria-autocomplete="both"
aria-describedby="ComboBox0-option"
aria-describedby={undefined}
aria-disabled={undefined}
aria-expanded={false}
aria-label={undefined}
aria-labelledby={undefined}
aria-owns="ComboBox0-list"
aria-readonly="true"
aria-owns={undefined}
autoCapitalize="off"
autoComplete="off"
className=
Expand Down Expand Up @@ -396,13 +395,12 @@ exports[`ComboBox renders a ComboBox with a Keytip correctly 1`] = `
<input
aria-activedescendant={undefined}
aria-autocomplete="both"
aria-describedby="ComboBox4-option ktp-layer-id ktp-a"
aria-describedby=" ktp-layer-id ktp-a"
aria-disabled={undefined}
aria-expanded={false}
aria-label={undefined}
aria-labelledby={undefined}
aria-owns="ComboBox4-list"
aria-readonly="true"
aria-owns={undefined}
autoCapitalize="off"
autoComplete="off"
className=
Expand Down