Page MenuHomePhabricator

Form <input> elements must have labels & Placeholder not showing when type of inputbox is search2
Open, MediumPublicBUG REPORT

Description

Bug #1

The current implementation of the InputBox extension doesn't provide an avenue to add aria-label attribute to the inputbox. This causes the text input box control generated by the extension to accessibility tests. The aim of this task is to address this identified issue and make the extension fully accessible to screen readers and all other electronic visual aiding devices.

<inputbox>
    type=search2
    width=120
    buttonlabel=Search
    **arialabel=Search this wiki**
</inputbox>

Steps to Reproduce

Bug #2
When inputbox has a placeholder attribute, the placeholder is ignored when type of inputbox is search2.
Steps to Reproduce

<inputbox>
    type=search2
    width=120
    buttonlabel=Search
    **placeholder=Search this wiki**
</inputbox>

Expected

**<input type="text" name="search" class="mw-ui-input mw-ui-input-inline" size="120" placeholder="Search this wiki" id="bodySearchInput0.886943992064" dir="ltr">**

Actual

<input type="text" name="search" class="mw-ui-input mw-ui-input-inline" size="100" id="bodySearchInput0.287970723021" dir="ltr">

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 9 2020, 5:49 PM
Akinwale-microsoft renamed this task from [Accessibility] Form <input> elements must have labels to [Accessibility] Form <input> elements must have labels & Placeholder not showing when type of inputbox is search2.Jan 21 2020, 7:52 PM
Akinwale-microsoft updated the task description. (Show Details)

Change 566620 had a related patch set uploaded (by Akinwale-microsoft; owner: Akinwale-microsoft):
[mediawiki/extensions/InputBox@master] Fix: Provide an option to supply the aria-label attribute to the inputbox to allow generated markup be accessible to screen readers <inputbox> type=search2 width=120 buttonlabel=Search arialabel=Search this wiki </inputbox>

https://gerrit.wikimedia.org/r/566620

Change 566620 abandoned by Akinwale-microsoft:
Fix: Provide an option to supply the aria-label attribute to the inputbox to allow generated markup be accessible to screen readers <inputbox> type=search2 width=120 buttonlabel=Search arialabel=Search this wiki </inputbox>

Reason:
Duplicate patches

https://gerrit.wikimedia.org/r/566620

Change 572050 had a related patch set uploaded (by Akinwale-microsoft; owner: Akinwale-microsoft):
[mediawiki/extensions/InputBox@master] Fix: Provide an option to supply the aria-label attribute to the inputbox to allow generated markup be accessible to screen readers <inputbox> type=search2 width=120 buttonlabel=Search arialabel=Search this wiki </inputbox>

https://gerrit.wikimedia.org/r/572050

Volker_E renamed this task from [Accessibility] Form <input> elements must have labels & Placeholder not showing when type of inputbox is search2 to Form <input> elements must have labels & Placeholder not showing when type of inputbox is search2.Apr 24 2020, 11:29 PM
Volker_E triaged this task as Medium priority.
Volker_E updated the task description. (Show Details)

Change 572050 merged by jenkins-bot:
[mediawiki/extensions/InputBox@master] Provide an aria-label attribute option to the input textbox

https://gerrit.wikimedia.org/r/572050

Documentation needs to be added to https://www.mediawiki.org/wiki/Extension:InputBox

Documentation added, improvements are welcome.