A11Y: Header icons should be buttons, not links (#20242)
This commit is contained in:
parent
3e826a67d1
commit
8bc9acc414
|
@ -230,7 +230,7 @@ createWidget(
|
||||||
|
|
||||||
html(attrs) {
|
html(attrs) {
|
||||||
return h(
|
return h(
|
||||||
"a.icon",
|
"button.icon.btn-flat",
|
||||||
{
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"aria-haspopup": true,
|
"aria-haspopup": true,
|
||||||
|
@ -263,7 +263,7 @@ createWidget(
|
||||||
}
|
}
|
||||||
|
|
||||||
return h(
|
return h(
|
||||||
"a.icon.btn-flat",
|
"button.icon.btn-flat",
|
||||||
{
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"aria-expanded": attrs.active,
|
"aria-expanded": attrs.active,
|
||||||
|
|
|
@ -117,6 +117,8 @@
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
.icon {
|
.icon {
|
||||||
|
box-sizing: content-box;
|
||||||
|
appearance: none;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<a
|
<a
|
||||||
href={{this.href}}
|
href={{this.href}}
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
class={{concat-class "icon" (if this.isActive "active")}}
|
class={{concat-class "icon btn-flat" (if this.isActive "active")}}
|
||||||
>
|
>
|
||||||
{{d-icon "comment"}}
|
{{d-icon "comment"}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue