mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 00:37:06 +08:00
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",
|
||||
{
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user