Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a11y button fixes #936

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/components/narrative/trip-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import React, { Component, useContext, useMemo } from 'react'
import * as uiActions from '../../actions/ui'
import { ComponentContext } from '../../util/contexts'
import { IconWithText } from '../util/styledIcon'
import InvisibleA11yLabel from '../util/invisible-a11y-label'
import PopupTriggerText from '../app/popup-trigger-text'
import startOver from '../util/start-over'

Expand Down Expand Up @@ -55,6 +56,12 @@ class CopyUrlButton extends Component {
render() {
return (
<div>
{/* Announces copy button status to AT */}
<InvisibleA11yLabel aria-live="assertive">
{this.state.showCopied && (
<FormattedMessage id="components.TripTools.linkCopied" />
miles-grant-ibigroup marked this conversation as resolved.
Show resolved Hide resolved
)}
</InvisibleA11yLabel>
<Button
aria-live={this.state.showCopied ? 'assertive' : undefined}
className="tool-button"
Expand Down
1 change: 1 addition & 0 deletions lib/components/viewers/RouteRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export class RouteRow extends PureComponent {
routeShortName: route?.shortName
}}
mode={getModeFromRoute(route)}
role="image"
width={28}
/>
</ModeIconElement>
Expand Down