UX: Make the edits indicator a real link for accessibility (#6570)
This link didn't have an `href` attribute, so it wasn't in the tab order. This commit fixes that, while adding a call to `preventDefault` in the event handler to avoid any regression in event handling.
This commit is contained in:
parent
81ccfa5a8a
commit
a2044c4528
|
@ -62,13 +62,14 @@ export default createWidget("post-edits-indicator", {
|
||||||
"a",
|
"a",
|
||||||
{
|
{
|
||||||
className,
|
className,
|
||||||
attributes: { title }
|
attributes: { title, href: "#" }
|
||||||
},
|
},
|
||||||
contents
|
contents
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
click() {
|
click(e) {
|
||||||
|
e.preventDefault();
|
||||||
if (this.attrs.wiki && this.attrs.version === 1) {
|
if (this.attrs.wiki && this.attrs.version === 1) {
|
||||||
this.sendWidgetAction("editPost");
|
this.sendWidgetAction("editPost");
|
||||||
} else if (this.attrs.canViewEditHistory) {
|
} else if (this.attrs.canViewEditHistory) {
|
||||||
|
|
Loading…
Reference in New Issue