Skip to content

Commit

Permalink
Apparently the selected option of input-combobox is the value
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Oct 27, 2019
1 parent efcc8bd commit ed79433
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ cloning. See tests/README.md for more info about the test setup.

### browser (Chrome)

135/144 of which 5 are due to missing whitespace.
136/144 of which 5 are due to missing whitespace.

### jsdom

<details>
<summary>report 125/159 passing of which 16 are due `::before { content }`, 14 are accessible desc, 8 are pathological </summary>
<summary>report 126/159 passing of which 16 are due `::before { content }`, 14 are accessible desc, 7 are pathological </summary>

```bash
web-platform-tests
Expand Down Expand Up @@ -79,7 +79,7 @@ cloning. See tests/README.md for more info about the test setup.
✓ name_from_content_of_label-manual.html
✓ name_from_content_of_labelledby_element-manual.html
✓ name_from_content_of_labelledby_elements_one_of_which_is_hidden-manual.html
[expected fail] name_heading-combobox-focusable-alternative-manual.html
✓ name_heading-combobox-focusable-alternative-manual.html
✓ name_image-title-manual.html
✓ name_link-mixed-content-manual.html
✓ name_link-with-label-manual.html
Expand Down
5 changes: 3 additions & 2 deletions sources/accessible-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,13 @@ export function computeAccessibleName(
}

// 2E
if (skipToStep2E || context.isEmbeddedInLabel) {
if (skipToStep2E || context.isEmbeddedInLabel || context.isReferenced) {
if (hasAnyConcreteRoles(current, ["combobox", "listbox"])) {
consultedNodes.add(current);
const selectedOptions = querySelectedOptions(current);
if (selectedOptions.length === 0) {
return "";
// defined per test `name_heading_combobox`
return isHTMLInputElement(current) ? current.value : "";
}
return Array.from(selectedOptions)
.map(selectedOption => {
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/integration/web-platform-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ context("wpt", () => {
"name_from_content_of_labelledby_elements_one_of_which_is_hidden-manual",
"pass"
],
["name_heading-combobox-focusable-alternative-manual", "fail"], // wrong text alternative, see mailing list
["name_heading-combobox-focusable-alternative-manual", "pass"],
["name_image-title-manual", "pass"],
["name_link-mixed-content-manual", "pass"],
["name_link-with-label-manual", "pass"],
Expand Down
2 changes: 0 additions & 2 deletions tests/wpt-jsdom/to-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ name_file-label-inline-block-elements-manual.html:
[fail, getComputedStyle display defaults not implemented]
name_file-label-inline-block-styles-manual.html:
[fail, getComputedStyle pseudo selector not implemented]
name_heading-combobox-focusable-alternative-manual.html:
[fail, could not find spec for that]
name_test_case_552-manual.html:
[fail, getComputedStyle pseudo selector not implemented]
name_test_case_553-manual.html:
Expand Down

0 comments on commit ed79433

Please sign in to comment.