A11Y: Header icons should be buttons, not links (#20242)

This commit is contained in:
Kris 2023-02-10 13:55:51 -05:00 committed by GitHub
parent 3e826a67d1
commit 8bc9acc414
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -230,7 +230,7 @@ createWidget(
html(attrs) {
return h(
"a.icon",
"button.icon.btn-flat",
{
attributes: {
"aria-haspopup": true,
@ -263,7 +263,7 @@ createWidget(
}
return h(
"a.icon.btn-flat",
"button.icon.btn-flat",
{
attributes: {
"aria-expanded": attrs.active,

View File

@ -117,6 +117,8 @@
float: left;
}
.icon {
box-sizing: content-box;
appearance: none;
position: relative;
display: flex;
align-items: center;

View File

@ -1,7 +1,7 @@
<a
href={{this.href}}
tabindex="0"
class={{concat-class "icon" (if this.isActive "active")}}
class={{concat-class "icon btn-flat" (if this.isActive "active")}}
>
{{d-icon "comment"}}