Skip to content

Commit

Permalink
Merge pull request #3384 from owid/grapher-tab-button-types
Browse files Browse the repository at this point in the history
🐛 add type="button" to all Grapher buttons
  • Loading branch information
ikesau authored Mar 20, 2024
2 parents 6708c3f + a7f48d2 commit d4f0353
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ export function ActionButton(props: {
setShowTooltip(false)
}}
aria-label={props.label}
type="button"
>
<FontAwesomeIcon icon={props.icon} />
{props.showLabel && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function Tab(props: {
onClick={props.onClick}
data-track-note={"chart_click_" + props.tab}
aria-label={props.tab}
type="button"
>
{props.icon}
{props.showLabel && <span className="label">{props.tab}</span>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export class EntitySelectionToggle extends React.Component<{
this.props.manager.isSelectingData = !active
e.stopPropagation()
}}
type="button"
data-track-note="chart_add_entity"
aria-label={`${label.action} ${label.entity}`}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ export class SettingsMenu extends React.Component<{
onClick={this.toggleVisibility}
data-track-note="chart_settings_menu_toggle"
title="Chart settings"
type="button"
aria-label="Chart settings"
>
<FontAwesomeIcon icon={faGear} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ export class TimelineComponent extends React.Component<{
return (
<button
className="date clickable"
type="button"
onClick={(): void =>
markerType === "start"
? controller.resetStartToMin()
Expand Down

0 comments on commit d4f0353

Please sign in to comment.