From 786ab5692736c043b83ca81e9f2300fbed94968c 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 fffb5e02874631397ab8a047732c7f9c681f1df9 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 41a95e92f7..2485f0f480 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 {