From 4f335da8f88fccf4285023208664bd8594a1deb9 Mon Sep 17 00:00:00 2001 From: Holden Foreman <38192823+hs4man21@users.noreply.github.com> Date: Thu, 5 Jan 2023 07:36:42 -0500 Subject: [PATCH] [Glitch] Add aria-hidden to 'Hide image' button in MediaGallery since the button is useless to screen reader users Port c5da2f8c439f86f809d750b42aa11cdeef6b7c1f to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/components/icon_button.js | 4 ++++ app/javascript/flavours/glitch/components/media_gallery.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/components/icon_button.js b/app/javascript/flavours/glitch/components/icon_button.js index 41a95e92f..2485f0f48 100644 --- a/app/javascript/flavours/glitch/components/icon_button.js +++ b/app/javascript/flavours/glitch/components/icon_button.js @@ -30,6 +30,7 @@ export default class IconButton extends React.PureComponent { counter: PropTypes.number, obfuscateCount: PropTypes.bool, href: PropTypes.string, + ariaHidden: PropTypes.bool, }; static defaultProps = { @@ -39,6 +40,7 @@ export default class IconButton extends React.PureComponent { animate: false, overlay: false, tabIndex: '0', + ariaHidden: false, }; state = { @@ -115,6 +117,7 @@ export default class IconButton extends React.PureComponent { counter, obfuscateCount, href, + ariaHidden, } = this.props; const { @@ -155,6 +158,7 @@ export default class IconButton extends React.PureComponent {