UX: remove aria-label for buttons when title attribute exists. (#14529)

Both `aria-label` and `title` have the same value and NVDA reading both the texts while navigating between buttons. NVDA already has an open issue https://github.com/nvaccess/nvda/issues/7841. We're removing `aria-label` until they fix it.
This commit is contained in:
Vinoth Kannan 2021-10-12 23:55:59 +05:30 committed by GitHub
parent 100095af50
commit 1b99f99ff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 2 deletions

View File

@ -38,7 +38,6 @@ export const ButtonClass = {
}
if (title) {
attributes["aria-label"] = title;
attributes.title = title;
}

View File

@ -75,7 +75,6 @@ discourseModule("Integration | Component | Widget | button", function (hooks) {
test(assert) {
assert.equal(query("button").title, "foo bar");
assert.equal(query("button").getAttribute("aria-label"), "foo bar");
},
});
});