Skip to content

Commit

Permalink
fix(Button): hide button icons from assistive technology (carbon-desi…
Browse files Browse the repository at this point in the history
…gn-system#1746)

* fix(Button): hide button icons from assistive technology

* chore: update snapshots
  • Loading branch information
emyarod authored and asudoh committed Jan 23, 2019
1 parent 297af2e commit 74be9c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const Button = ({
name={Object(icon) !== icon ? icon : undefined}
description={iconDescription}
className={`${prefix}--btn__icon`}
aria-hidden="true"
/>
);
}
Expand Down Expand Up @@ -145,6 +146,7 @@ Button.propTypes = {
svgData: PropTypes.object.isRequired,
}),
PropTypes.string,
PropTypes.node,
]),

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ exports[`DataTable.TableBatchAction should render 1`] = `
type="button"
>
<Icon
aria-hidden="true"
className="bx--btn__icon"
description="Add"
fillRule="evenodd"
Expand Down Expand Up @@ -74,6 +75,7 @@ exports[`DataTable.TableBatchAction should render 1`] = `
>
<svg
alt="Add"
aria-hidden="true"
aria-label="Add"
className="bx--btn__icon"
fillRule="evenodd"
Expand Down

0 comments on commit 74be9c4

Please sign in to comment.