Page MenuHomePhabricator

Lose of focus when a dialog has another input
Closed, InvalidPublic

Description

Follow up to T162127,

Steps to reproduce:

  1. Safari, or, Android Mobile
  2. Open MediaWiki:OOjsPrompt2.js (Its source is here)
  3. Try to write something on that input

Actual:
You can't as it immediately focuses on <select>

Expected:
I guess it should work.

See the attachment,

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 29 2018, 4:47 PM
Ebraminio updated the task description. (Show Details)Apr 29 2018, 5:00 PM
Volker_E closed this task as Invalid.Apr 30 2018, 9:12 PM

That's not the case on Android Chrome or Firefox browser.
But that doesn't matter, as the problem lays in the code appending native form elements to a TextInputWidget. OOUI's TextInputWidget is wrapped in a label element for accessibility reasons and the native select is appended within the TextInput's label, which is an accessibility violation.
You should rather turn the select widget into a DropdownWidget.
And consider turning the TextInput into a NumberInputWidget if it's just about line numbers.

Declining this for code reasons.

Vvjjkkii renamed this task from Lose of focus when a dialog has another input to j0daaaaaaa.Jul 1 2018, 1:13 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
Yann renamed this task from j0daaaaaaa to Lose of focus when a dialog has another input.Jul 1 2018, 1:37 PM
Yann closed this task as Invalid.
Yann raised the priority of this task from High to Needs Triage.
Yann updated the task description. (Show Details)
Yann added a subscriber: Aklapper.