Codex buttons that are anchor elements should have role button

Per https://doc.wikimedia.org/codex/latest/components/demos/button.html#link-buttons-and-other-elements
this behaves like a button so should have the role attribute.

Bug: T375834
Change-Id: If2a9ae4c301e20305699d91542fe382cef46763e
This commit is contained in:
Jon Robson 2024-09-26 17:27:42 -07:00
parent 3435a19eb9
commit 0c81b0472f

View file

@ -275,6 +275,7 @@ class Hooks implements
'class' => $class,
'href' => SpecialPage::getTitleFor( 'Thanks', $subpage . $id )->getFullURL(),
'title' => $tooltip,
'role' => 'button',
'data-' . $type . '-id' => $id,
'data-recipient-gender' => $this->genderCache->getGenderOf( $recipient->getName(), __METHOD__ ),
],