Skip to content

Commit

Permalink
feat: add warnings to the button component for accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Chisomchima committed Feb 15, 2024
1 parent 1da0fa5 commit 38e6497
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions collections/forms/i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-02-15T10:07:40.463Z\n"
"PO-Revision-Date: 2024-02-15T10:07:40.463Z\n"
"POT-Creation-Date: 2024-02-15T15:06:08.983Z\n"
"PO-Revision-Date: 2024-02-15T15:06:08.983Z\n"

msgid "Upload file"
msgstr "Upload file"
Expand Down
2 changes: 1 addition & 1 deletion components/button/src/button/__tests__/Button.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('<Button>', () => {
let consoleSpy

beforeEach(() => {
consoleSpy = jest.spyOn(console, 'warn').mockImplementation()
consoleSpy = jest.spyOn(console, 'debug').mockImplementation()
})

afterEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion components/button/src/button/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const Button = ({

const { 'aria-label': ariaLabel, title } = otherProps
if (!children && !title && !ariaLabel) {
console.warn(
console.debug(
'Button component has no children but is missing title or ariaLabel attribute.'
)
}
Expand Down

0 comments on commit 38e6497

Please sign in to comment.