From b4f0a0766852edb2aee510c2df6b23d363ec52d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Thu, 30 Apr 2020 14:22:35 +0200 Subject: [PATCH] CustomSelectControl: set aria-hidden to empty option list (#21298) * CustomSelectControl: don't render option list if empty * Render options list but use aria-hidden --- packages/components/src/custom-select-control/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/src/custom-select-control/index.js b/packages/components/src/custom-select-control/index.js index 49eb2b51a5c438..fdda79fb97aecd 100644 --- a/packages/components/src/custom-select-control/index.js +++ b/packages/components/src/custom-select-control/index.js @@ -79,6 +79,7 @@ export default function CustomSelectControl( { const menuProps = getMenuProps( { className: 'components-custom-select-control__menu', + 'aria-hidden': ! isOpen, } ); // We need this here, because the null active descendant is not // fully ARIA compliant.