From 6d3cd338109026612c43423381ea107c32db8be6 Mon Sep 17 00:00:00 2001 From: cowuertz Date: Mon, 3 Dec 2018 13:43:41 -0800 Subject: [PATCH 1/3] don't define labelledBy aria attribute when we are providing an ariaLabel --- .../src/components/Dropdown/Dropdown.base.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.base.tsx b/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.base.tsx index e98843209af25..69b397e1025f0 100644 --- a/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.base.tsx +++ b/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.base.tsx @@ -226,7 +226,7 @@ export class DropdownBase extends BaseComponent Date: Mon, 3 Dec 2018 14:27:57 -0800 Subject: [PATCH 2/3] update snapshots to reflect no ariaLabelledBy attribute when ariaLabel is provided --- .../src/components/__snapshots__/Dropdown.Basic.Example.tsx.shot | 1 - .../components/__snapshots__/Dropdown.Custom.Example.tsx.shot | 1 - .../src/components/__snapshots__/Dropdown.Error.Example.tsx.shot | 1 - 3 files changed, 3 deletions(-) diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/Dropdown.Basic.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/Dropdown.Basic.Example.tsx.shot index a54e5ef7f5dce..51c5a3d27dcd8 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/Dropdown.Basic.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/Dropdown.Basic.Example.tsx.shot @@ -44,7 +44,6 @@ exports[`Component Examples renders Dropdown.Basic.Example.tsx correctly 1`] = ` aria-describedby="Basicdrop1-option" aria-expanded="false" aria-label="Basic dropdown example" - aria-labelledby="Basicdrop1-label" className= ms-Dropdown { diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/Dropdown.Custom.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/Dropdown.Custom.Example.tsx.shot index 24807fc1566ba..382bd12387fa1 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/Dropdown.Custom.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/Dropdown.Custom.Example.tsx.shot @@ -44,7 +44,6 @@ exports[`Component Examples renders Dropdown.Custom.Example.tsx correctly 1`] = aria-describedby="Customdrop1-option" aria-expanded="false" aria-label="Custom dropdown example" - aria-labelledby="Customdrop1-label" className= ms-Dropdown { diff --git a/packages/office-ui-fabric-react/src/components/__snapshots__/Dropdown.Error.Example.tsx.shot b/packages/office-ui-fabric-react/src/components/__snapshots__/Dropdown.Error.Example.tsx.shot index 77ab189c84e0b..578f6c290760e 100644 --- a/packages/office-ui-fabric-react/src/components/__snapshots__/Dropdown.Error.Example.tsx.shot +++ b/packages/office-ui-fabric-react/src/components/__snapshots__/Dropdown.Error.Example.tsx.shot @@ -44,7 +44,6 @@ exports[`Component Examples renders Dropdown.Error.Example.tsx correctly 1`] = ` aria-describedby="Errormessagedrop1-option" aria-expanded="false" aria-label="Error message dropdown example" - aria-labelledby="Errormessagedrop1-label" className= ms-Dropdown { From b4dd3b7be56132f6ca6583fc822cb5fe64976264 Mon Sep 17 00:00:00 2001 From: cowuertz Date: Mon, 3 Dec 2018 14:30:14 -0800 Subject: [PATCH 3/3] add change file --- ...ertz-dropdown_aria_label_fix_2018-12-03-22-30.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/office-ui-fabric-react/cowuertz-dropdown_aria_label_fix_2018-12-03-22-30.json diff --git a/common/changes/office-ui-fabric-react/cowuertz-dropdown_aria_label_fix_2018-12-03-22-30.json b/common/changes/office-ui-fabric-react/cowuertz-dropdown_aria_label_fix_2018-12-03-22-30.json new file mode 100644 index 0000000000000..3c411f2d89f65 --- /dev/null +++ b/common/changes/office-ui-fabric-react/cowuertz-dropdown_aria_label_fix_2018-12-03-22-30.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "The Dropdown component will now only include an aria-labelled-by attribute when there is no provided ariaLabel prop. This means that the component will honor provided ariaLabels and create markup such that screen readers will read the aria label and not the regular label.", + "type": "minor" + } + ], + "packageName": "office-ui-fabric-react", + "email": "cowuertz@microsoft.com" +} \ No newline at end of file