From 20314b5f560921b8e762790dfa45386bf7916a54 Mon Sep 17 00:00:00 2001 From: Silviu Alexandru Avram Date: Mon, 20 Mar 2023 09:46:15 +0200 Subject: [PATCH] feat: getter prop with aria-label will not add aria-labelledby (#1488) --- README.md | 6 ++++++ src/__tests__/downshift.aria.js | 15 ++++++++++++--- src/downshift.js | 2 +- src/hooks/useCombobox/README.md | 6 ++++++ .../useCombobox/__tests__/getInputProps.test.js | 9 +++++++++ .../useCombobox/__tests__/getMenuProps.test.js | 9 +++++++++ src/hooks/useCombobox/index.js | 6 ++++-- src/hooks/useSelect/README.md | 6 ++++++ .../useSelect/__tests__/getMenuProps.test.js | 8 +++++--- .../__tests__/getToggleButtonProps.test.js | 9 +++++++++ src/hooks/useSelect/index.js | 7 ++++--- 11 files changed, 71 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 746419fca..7fe38f39b 100644 --- a/README.md +++ b/README.md @@ -747,6 +747,12 @@ Optional properties: from `getInputProps` and a `disabled` prop will be returned (effectively disabling the input). +- `aria-label`: By default the menu will add an `aria-labelledby` that refers to + the `