Skip to content

Commit e6e1c8b

Browse files
author
Nathan LaPre
committed
Bug 1878350: Expose empty string to WebDriver to represent "no accessible name", r=Jamie,webdriver-reviewers,whimboo
This revision modifies the WebDriver implementation to return an empty string, rather than null, for the value of an accessible name, in the event that the accessible name calculation produces no accessible name. This does not change what we actually think the accessible name is (null), nor does it change how we expose it to platforms, but it does bring us in line with other browsers for the purpose of passing web platform name tests. This revision also removes the 16 expected failures in html "no name" tests. Differential Revision: https://phabricator.services.mozilla.com/D201633
1 parent 0637f72 commit e6e1c8b

File tree

2 files changed

+5
-47
lines changed

2 files changed

+5
-47
lines changed

remote/marionette/actors/MarionetteCommandsChild.sys.mjs

+5
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,11 @@ export class MarionetteCommandsChild extends JSWindowActorChild {
287287
return null;
288288
}
289289

290+
// If name is null (absent), expose the empty string.
291+
if (accessible.name === null) {
292+
return "";
293+
}
294+
290295
return accessible.name;
291296
}
292297

Original file line numberDiff line numberDiff line change
@@ -1,48 +1 @@
11
[names.html]
2-
[address no name]
3-
expected: FAIL
4-
5-
[aside no name]
6-
expected: FAIL
7-
8-
[blockquote no name]
9-
expected: FAIL
10-
11-
[details no name]
12-
expected: FAIL
13-
14-
[figure no name]
15-
expected: FAIL
16-
17-
[footer no name]
18-
expected: FAIL
19-
20-
[form no name]
21-
expected: FAIL
22-
23-
[hgroup no name]
24-
expected: FAIL
25-
26-
[hr no name]
27-
expected: FAIL
28-
29-
[ol no name]
30-
expected: FAIL
31-
32-
[main no name]
33-
expected: FAIL
34-
35-
[menu no name]
36-
expected: FAIL
37-
38-
[nav no name]
39-
expected: FAIL
40-
41-
[search no name]
42-
expected: FAIL
43-
44-
[section no name]
45-
expected: FAIL
46-
47-
[ul no name]
48-
expected: FAIL

0 commit comments

Comments
 (0)