diff --git a/cypress/fixtures/selectors.json b/cypress/fixtures/selectors.json index 9c6ecbdaba..da975f7e1c 100644 --- a/cypress/fixtures/selectors.json +++ b/cypress/fixtures/selectors.json @@ -10,6 +10,7 @@ "indicatorClear": ".react-select__clear-indicator", "indicatorDropdown": ".react-select__dropdown-indicator", "menu": ".react-select__menu", + "control": ".react-select__control", "menuOption": ".react-select__option", "noOptionsValue": ".react-select__menu-notice--no-options", "placeholder": ".react-select__placeholder", diff --git a/cypress/integration/single-select.spec.ts b/cypress/integration/single-select.spec.ts index d4700dc154..2e7effeca5 100644 --- a/cypress/integration/single-select.spec.ts +++ b/cypress/integration/single-select.spec.ts @@ -107,7 +107,11 @@ describe('Single Select', () => { .click({ force: true }) .find('input') .should('exist') - .should('be.disabled'); + .should('be.disabled') + // control should have aria-disabled + .get(selector.singleBasicSelect) + .find(selector.control) + .should('have.attr', 'aria-disabled', 'true'); }); it(`Should filter options when searching in view: ${viewport}`, () => { diff --git a/docs/pages/typescript/index.tsx b/docs/pages/typescript/index.tsx index ae1f1b4f1c..f296b03e20 100644 --- a/docs/pages/typescript/index.tsx +++ b/docs/pages/typescript/index.tsx @@ -84,14 +84,19 @@ const onChange = (option: readonly Option[], actionMeta: ActionMeta