diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b7032cadf..cad8279c7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -56,6 +56,7 @@ Changelog * Fix: Remove tab order customisations in CMS admin (Jordan Bauer) * Fix: Add labels to permission checkboxes for screen reader users (Helen Chapman, Katie Locke) * Fix: Page.copy() no longer copies child objects when the accesssor name is included in `exclude_fields_in_copy` (Karl Hobley) + * Fix: Move focus to the pages explorer menu when open (Helen Chapman) 2.5.1 (07.05.2019) diff --git a/client/src/components/Button/Button.js b/client/src/components/Button/Button.js index 932755d07..ec9942448 100644 --- a/client/src/components/Button/Button.js +++ b/client/src/components/Button/Button.js @@ -38,6 +38,7 @@ const Button = ({ target, preventDefault, onClick, + dialogTrigger, }) => { const hasText = children !== null; const iconName = isLoading ? 'spinner' : icon; @@ -54,6 +55,7 @@ const Button = ({ rel={target === '_blank' ? 'noopener noreferrer' : null} href={href} target={target} + aria-haspopup={dialogTrigger ? 'dialog' : null} > {hasText ? children : accessibleElt} @@ -73,6 +75,7 @@ Button.propTypes = { onClick: PropTypes.func, isLoading: PropTypes.bool, preventDefault: PropTypes.bool, + dialogTrigger: PropTypes.bool, }; Button.defaultProps = { @@ -85,6 +88,7 @@ Button.defaultProps = { onClick: null, isLoading: false, preventDefault: true, + dialogTrigger: false, }; export default Button; diff --git a/client/src/components/Button/Button.test.js b/client/src/components/Button/Button.test.js index f82bf2fe6..611b2d2ab 100644 --- a/client/src/components/Button/Button.test.js +++ b/client/src/components/Button/Button.test.js @@ -20,6 +20,10 @@ describe('Button', () => { expect(shallow( - +
(