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:
Matthew Campbell 2018-11-06 15:11:52 -08:00 committed by Sam
parent 81ccfa5a8a
commit a2044c4528

View File

@ -62,13 +62,14 @@ export default createWidget("post-edits-indicator", {
"a",
{
className,
attributes: { title }
attributes: { title, href: "#" }
},
contents
);
},
click() {
click(e) {
e.preventDefault();
if (this.attrs.wiki && this.attrs.version === 1) {
this.sendWidgetAction("editPost");
} else if (this.attrs.canViewEditHistory) {