Status

()

enhancement
P5
normal
ASSIGNED
3 months ago
10 hours ago

People

(Reporter: ntim, Assigned: ntim)

Tracking

(Depends on 1 bug, Blocks 3 bugs)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 months ago

The search-textbox binding powers textbox[type="search"].

Supports:

  • A timeout feature
  • A clear button
  • A search button on Windows/Linux only, Mac has a search icon on the left that does nothing.
  • Has custom styling too.

I don't think the interface needs to be ported one to one though.

Possible paths:

  • HTML/XUL custom element
  • Fix bug 558594 and use input[type=search] or a customized input[type=search] element.
  • Drop the special buttons altogether and use a plain/styled input.
(Assignee)

Updated

3 months ago
Duplicate of this bug: 1453666

Updated

3 months ago
Priority: -- → P5
Assignee: nobody → ntim.bugs
Status: NEW → ASSIGNED
(Assignee)

Updated

a month ago
Depends on: 1534799
Blocks: 1534913

For https://treeherder.mozilla.org/#/jobs?repo=try&revision=ea86a8336f17cddc42a25c975ee63d0770664e3c&selectedJob=241020138 / TEST-UNEXPECTED-FAIL | accessible/tests/mochitest/states/test_textbox.xul | extraState bits should not be present in ID [ 'input node', address: [object HTMLInputElement] ] [searchfield]!got 'autocompletion', expected '0'

I wonder if the html:input's accessible knows about being in a XBL binding parent and doesn't inherit the aria-autocomplete value being set at https://searchfox.org/mozilla-central/rev/d33d470140ce3f9426af523eaa8ecfa83476c806/toolkit/content/widgets/textbox.xml#304. Both with and without your patch the html:input.textbox-input underneath the content doesn't have any aria attribute and the host element does have aria-autocomplete="list". I would guess the only difference here for a11y is that without the patch the input is XBL anon content. Alex, do you have any idea if this is the case, or pointers on where to look?

Flags: needinfo?(surkov.alexander)

you're right HTML:input accessible knows weather it is a part of XUL:textbox or not. The state problem related code lives here [1], but there's a whole bunch of other places where HTML:input makes that check. I'd suggest to add a method HTMLTextFieldAccessible::IsInTextbox() which will replace all instances of BindingParent().

[1] https://searchfox.org/mozilla-central/source/accessible/html/HTMLFormControlAccessible.cpp#340

Flags: needinfo?(surkov.alexander)

Thanks Alex, that will be helpful to fix for any future de-XBL work for textboxes as well. Just one note is that BindingParent() also returns Native Anonymous Content parent which is used on some form controls so I'm thinking we rename it to BindingOrWidgetParent or similar, and have it also return the closest <xul:textbox>, after checking GetBindingParent().

You need to log in before you can comment on or make changes to this bug.