diff options
author | Holden Foreman <38192823+hs4man21@users.noreply.github.com> | 2023-01-08 21:54:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 03:54:03 +0100 |
commit | 2bcb081ce8ab42649932404f3a13f69a0b582af9 (patch) | |
tree | 42cb8283c100a6064016681d6d04a2764476879c /app | |
parent | 2195f21524270e50c00a6292f77dfe39342ff482 (diff) |
Fix footer link circle dividers' screen reader accessibility by adding aria-hidden (#22576)
* Fix footer link circle dividers' screen reader accessibility by adding aria-hidden * Remove a circle erroneously added in prev commit, and make code more DRY
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/features/ui/components/link_footer.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/app/javascript/mastodon/features/ui/components/link_footer.js b/app/javascript/mastodon/features/ui/components/link_footer.js index 2b83d6378..3664a05bf 100644 --- a/app/javascript/mastodon/features/ui/components/link_footer.js +++ b/app/javascript/mastodon/features/ui/components/link_footer.js @@ -52,6 +52,8 @@ class LinkFooter extends React.PureComponent { const canInvite = signedIn && ((permissions & PERMISSION_INVITE_USERS) === PERMISSION_INVITE_USERS); const canProfileDirectory = profileDirectory; + const DividingCircle = <span aria-hidden>{' · '}</span>; + return ( <div className='link-footer'> <p> @@ -60,17 +62,17 @@ class LinkFooter extends React.PureComponent { <Link key='about' to='/about'><FormattedMessage id='footer.about' defaultMessage='About' /></Link> {canInvite && ( <> - {' · '} + {DividingCircle} <a key='invites' href='/invites' target='_blank'><FormattedMessage id='footer.invite' defaultMessage='Invite people' /></a> </> )} {canProfileDirectory && ( <> - {' · '} + {DividingCircle} <Link key='directory' to='/directory'><FormattedMessage id='footer.directory' defaultMessage='Profiles directory' /></Link> </> )} - {' · '} + {DividingCircle} <Link key='privacy-policy' to='/privacy-policy'><FormattedMessage id='footer.privacy_policy' defaultMessage='Privacy policy' /></Link> </p> @@ -78,13 +80,13 @@ class LinkFooter extends React.PureComponent { <strong>Mastodon</strong>: {' '} <a href='https://joinmastodon.org' target='_blank'><FormattedMessage id='footer.about' defaultMessage='About' /></a> - {' · '} + {DividingCircle} <a href='https://joinmastodon.org/apps' target='_blank'><FormattedMessage id='footer.get_app' defaultMessage='Get the app' /></a> - {' · '} + {DividingCircle} <Link to='/keyboard-shortcuts'><FormattedMessage id='footer.keyboard_shortcuts' defaultMessage='Keyboard shortcuts' /></Link> - {' · '} + {DividingCircle} <a href={source_url} rel='noopener noreferrer' target='_blank'><FormattedMessage id='footer.source_code' defaultMessage='View source code' /></a> - {' · '} + {DividingCircle} v{version} </p> </div> |