Skip to content

Commit 4c798df

Browse files
fix(dashboards): use correct aria roles for widgets in none edit mode
groups dashboard widgets as list in none edit mode so screen reader can allow to jump between widgets without going through content using keyboard.
1 parent 4dda7b1 commit 4c798df

12 files changed

Lines changed: 556 additions & 354 deletions

playwright/snapshots/dashboard.spec.ts-snapshots/custom-catalog--custom-catalog.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
- button "expand"
1010
- main:
1111
- heading "Dashboard with a custom library component" [level=2]
12-
- button "Edit"
12+
- button "Edit":
1313
- heading "Your own dashboard" [level=3]
1414
- paragraph: No widgets have been added yet. Start right now and discover the world of widgets.
15-
- button "Add widget"
15+
- button "Add widget"
16+
- list "Dashboard widgets"

playwright/snapshots/dashboard.spec.ts-snapshots/dashboard--mobile.yaml

Lines changed: 103 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -19,60 +19,106 @@
1919
- option "Success"
2020
- option "Warning"
2121
- option "Danger"
22-
- button "Edit"
23-
- img "Buildings at scale"
24-
- text: /Project Issues! \d+ Issues Number of contributing issues/
25-
- link "Go to issues":
26-
- /url: https://github.com/siemens/element/issues
27-
- text: Bar Chart
28-
- menubar:
29-
- menuitem "Print"
30-
- menuitem "Expand"
31-
- menuitem "Toggle"
32-
- text: Pie Chart
33-
- menubar:
34-
- menuitem "Expand"
35-
- text: Full Speed Line Chart
36-
- menubar:
37-
- menuitem "Print"
38-
- menuitem "Expand"
39-
- menuitem "Toggle"
40-
- text: List Widget
41-
- menubar:
42-
- menuitem "Sort descending"
43-
- textbox "Search..."
44-
- list:
45-
- listitem:
46-
- text: /\d+\+/
47-
- link "Taj Mahal":
48-
- /url: https://en.wikipedia.org/wiki/Taj_Mahal
49-
- text: /The Taj Mahal is an ivory-white marble mausoleum \d+\.\d+/
50-
- button "Building overview"
51-
- listitem:
52-
- text: info
53-
- link "Tower of Pisa":
54-
- /url: https://en.wikipedia.org/wiki/Leaning_Tower_of_Pisa
55-
- text: The Leaning Tower of Pisa is the campanile of Pisa Cathedral. 9.7
56-
- button "Building overview"
57-
- listitem:
58-
- text: 3 Eiffel Tower The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris. 8.3
59-
- button "Building overview"
60-
- listitem:
61-
- text: /5 Colosseum \d+\.\d+/
62-
- button "Building overview"
63-
- listitem:
64-
- text: 5 Burj Khalifa 4.5
65-
- button "Building overview"
66-
- listitem:
67-
- text: /6 St\. Basil's Cathedral \d+\.\d+/
68-
- button "Building overview"
69-
- link "Go to...":
70-
- /url: https://github.com/siemens/element/issues
71-
- text: Timeline Widget
72-
- list:
73-
- listitem: /Today \d+:\d+ Title Description/
74-
- listitem: /Today \d+:\d+ Title Description/
75-
- listitem: /Today \d+:\d+ Title Description/
76-
- listitem: /Today \d+:\d+ Title Description/
77-
- link "Go to...":
78-
- /url: https://github.com/siemens/element/issues
22+
- button "Edit":
23+
- list "Dashboard widgets":
24+
- listitem "Project Issues!":
25+
- img "Buildings at scale"
26+
- text: /Project Issues! \d+ Issues Number of contributing issues/
27+
- link "Go to issues":
28+
- /url: https://github.com/siemens/element/issues
29+
- listitem "Bar Chart":
30+
- text: ""
31+
- menubar:
32+
- menuitem "Print"
33+
- menuitem "Expand"
34+
- menuitem "Toggle"
35+
- listitem "Pie Chart":
36+
- text: ""
37+
- menubar:
38+
- menuitem "Expand"
39+
- listitem "Full Speed"
40+
- listitem "Line Chart":
41+
- text: ""
42+
- menubar:
43+
- menuitem "Print"
44+
- menuitem "Expand"
45+
- menuitem "Toggle"
46+
- listitem "List Widget":
47+
- text: ""
48+
- menubar:
49+
- menuitem "Sort descending"
50+
- textbox "Search..."
51+
- list:
52+
- listitem:
53+
- text: /\d+\+/
54+
- link "Taj Mahal":
55+
- /url: https://en.wikipedia.org/wiki/Taj_Mahal
56+
- text: /The Taj Mahal is an ivory-white marble mausoleum \d+\.\d+/
57+
- button "Building overview"
58+
- listitem:
59+
- text: info
60+
- link "Tower of Pisa":
61+
- /url: https://en.wikipedia.org/wiki/Leaning_Tower_of_Pisa
62+
- text: The Leaning Tower of Pisa is the campanile of Pisa Cathedral. 9.7
63+
- button "Building overview"
64+
- listitem:
65+
- text: 3 Eiffel Tower The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris. 8.3
66+
- button "Building overview"
67+
- listitem:
68+
- text: /5 Colosseum \d+\.\d+/
69+
- button "Building overview"
70+
- listitem:
71+
- text: 5 Burj Khalifa 4.5
72+
- button "Building overview"
73+
- listitem:
74+
- text: /6 St\. Basil's Cathedral \d+\.\d+/
75+
- button "Building overview"
76+
- link "Go to...":
77+
- /url: https://github.com/siemens/element/issues
78+
- listitem "Timeline Widget":
79+
- text: ""
80+
- list:
81+
- listitem: /Today \d+:\d+ Title Description/
82+
- listitem: /Today \d+:\d+ Title Description/
83+
- listitem: /Today \d+:\d+ Title Description/
84+
- listitem: /Today \d+:\d+ Title Description/
85+
- link "Go to...":
86+
- /url: https://github.com/siemens/element/issues
87+
- listitem "Weather":
88+
- text: ""
89+
- menubar:
90+
- menuitem "Expand"
91+
- text: /\d+°/
92+
- img "Sunny"
93+
- text: /Sunny \d+° \d+°/
94+
- list "Additional weather data":
95+
- listitem: /Wind [\d,.]+[bkmBKM]+\/h/
96+
- listitem: /Cloud cover \d+%/
97+
- listitem: /Precipitation [\d,.]+[bkmBKM]+/
98+
- listitem: UVI 1 low
99+
- list:
100+
- listitem:
101+
- text: Mon
102+
- img "Mon"
103+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
104+
- text: /\d+° \d+°/
105+
- listitem:
106+
- text: Tue
107+
- img "Tue"
108+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
109+
- text: /\d+° \d+°/
110+
- listitem:
111+
- text: Wed
112+
- img "Wed"
113+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
114+
- text: /\d+° \d+°/
115+
- listitem:
116+
- text: Thu
117+
- img "Thu"
118+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
119+
- text: /\d+° \d+°/
120+
- listitem:
121+
- text: Fri
122+
- img "Fri"
123+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
124+
- text: /\d+° \d+°/

playwright/snapshots/dashboard.spec.ts-snapshots/dashboard--normal.yaml

Lines changed: 102 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -22,59 +22,105 @@
2222
- option "Warning"
2323
- option "Danger"
2424
- button "Edit"
25-
- img "Buildings at scale"
26-
- text: /Project Issues! \d+ Issues Number of contributing issues/
27-
- link "Go to issues":
28-
- /url: https://github.com/siemens/element/issues
29-
- text: Bar Chart
30-
- menubar:
31-
- menuitem "Print"
32-
- menuitem "Expand"
33-
- menuitem "Toggle"
34-
- text: Pie Chart
35-
- menubar:
36-
- menuitem "Expand"
37-
- text: Full Speed Line Chart
38-
- menubar:
39-
- menuitem "Print"
40-
- menuitem "Expand"
41-
- menuitem "Toggle"
42-
- text: List Widget
43-
- menubar:
44-
- menuitem "Sort descending"
45-
- textbox "Search..."
46-
- list:
47-
- listitem:
48-
- text: /\d+\+/
49-
- link "Taj Mahal":
50-
- /url: https://en.wikipedia.org/wiki/Taj_Mahal
51-
- text: /The Taj Mahal is an ivory-white marble mausoleum \d+\.\d+/
52-
- button "Building overview"
53-
- listitem:
54-
- text: info
55-
- link "Tower of Pisa":
56-
- /url: https://en.wikipedia.org/wiki/Leaning_Tower_of_Pisa
57-
- text: The Leaning Tower of Pisa is the campanile of Pisa Cathedral. 9.7
58-
- button "Building overview"
59-
- listitem:
60-
- text: 3 Eiffel Tower The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris. 8.3
61-
- button "Building overview"
62-
- listitem:
63-
- text: /5 Colosseum \d+\.\d+/
64-
- button "Building overview"
65-
- listitem:
66-
- text: 5 Burj Khalifa 4.5
67-
- button "Building overview"
68-
- listitem:
69-
- text: /6 St\. Basil's Cathedral \d+\.\d+/
70-
- button "Building overview"
71-
- link "Go to...":
72-
- /url: https://github.com/siemens/element/issues
73-
- text: Timeline Widget
74-
- list:
75-
- listitem: /Today \d+:\d+ Title Description/
76-
- listitem: /Today \d+:\d+ Title Description/
77-
- listitem: /Today \d+:\d+ Title Description/
78-
- listitem: /Today \d+:\d+ Title Description/
79-
- link "Go to...":
80-
- /url: https://github.com/siemens/element/issues
25+
- list "Dashboard widgets":
26+
- listitem "Project Issues!":
27+
- img "Buildings at scale"
28+
- text: /Project Issues! \d+ Issues Number of contributing issues/
29+
- link "Go to issues":
30+
- /url: https://github.com/siemens/element/issues
31+
- listitem "Bar Chart":
32+
- text: ""
33+
- menubar:
34+
- menuitem "Print"
35+
- menuitem "Expand"
36+
- menuitem "Toggle"
37+
- listitem "Pie Chart":
38+
- text: ""
39+
- menubar:
40+
- menuitem "Expand"
41+
- listitem "Full Speed"
42+
- listitem "Line Chart":
43+
- text: ""
44+
- menubar:
45+
- menuitem "Print"
46+
- menuitem "Expand"
47+
- menuitem "Toggle"
48+
- listitem "List Widget":
49+
- text: ""
50+
- menubar:
51+
- menuitem "Sort descending"
52+
- textbox "Search..."
53+
- list:
54+
- listitem:
55+
- text: /\d+\+/
56+
- link "Taj Mahal":
57+
- /url: https://en.wikipedia.org/wiki/Taj_Mahal
58+
- text: /The Taj Mahal is an ivory-white marble mausoleum \d+\.\d+/
59+
- button "Building overview"
60+
- listitem:
61+
- text: info
62+
- link "Tower of Pisa":
63+
- /url: https://en.wikipedia.org/wiki/Leaning_Tower_of_Pisa
64+
- text: The Leaning Tower of Pisa is the campanile of Pisa Cathedral. 9.7
65+
- button "Building overview"
66+
- listitem:
67+
- text: 3 Eiffel Tower The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris. 8.3
68+
- button "Building overview"
69+
- listitem:
70+
- text: /5 Colosseum \d+\.\d+/
71+
- button "Building overview"
72+
- listitem:
73+
- text: 5 Burj Khalifa 4.5
74+
- button "Building overview"
75+
- listitem:
76+
- text: /6 St\. Basil's Cathedral \d+\.\d+/
77+
- button "Building overview"
78+
- link "Go to...":
79+
- /url: https://github.com/siemens/element/issues
80+
- listitem "Timeline Widget":
81+
- text: ""
82+
- list:
83+
- listitem: /Today \d+:\d+ Title Description/
84+
- listitem: /Today \d+:\d+ Title Description/
85+
- listitem: /Today \d+:\d+ Title Description/
86+
- listitem: /Today \d+:\d+ Title Description/
87+
- link "Go to...":
88+
- /url: https://github.com/siemens/element/issues
89+
- listitem "Weather":
90+
- text: ""
91+
- menubar:
92+
- menuitem "Expand"
93+
- text: /\d+°/
94+
- img "Sunny"
95+
- text: /Sunny \d+° \d+°/
96+
- list "Additional weather data":
97+
- listitem: /Wind [\d,.]+[bkmBKM]+\/h/
98+
- listitem: /Cloud cover \d+%/
99+
- listitem: /Precipitation [\d,.]+[bkmBKM]+/
100+
- listitem: UVI 1 low
101+
- list:
102+
- listitem:
103+
- text: Mon
104+
- img "Mon"
105+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
106+
- text: /\d+° \d+°/
107+
- listitem:
108+
- text: Tue
109+
- img "Tue"
110+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
111+
- text: /\d+° \d+°/
112+
- listitem:
113+
- text: Wed
114+
- img "Wed"
115+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
116+
- text: /\d+° \d+°/
117+
- listitem:
118+
- text: Thu
119+
- img "Thu"
120+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
121+
- text: /\d+° \d+°/
122+
- listitem:
123+
- text: Fri
124+
- img "Fri"
125+
- 'img /Wind: [\d,.]+[bkmBKM]+\/h/'
126+
- text: /\d+° \d+°/

0 commit comments

Comments
 (0)