Skip to content

Commit c2622d4

Browse files
Make editor fixture field controls explicit
1 parent 5d3ab19 commit c2622d4

3 files changed

Lines changed: 21 additions & 8 deletions

File tree

.github/fixtures/editor_a11y/editor_accessibility.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ code: |
99
question: What is your name?
1010
subquestion: This screen gives the graphical editor a real field to edit.
1111
fields:
12-
- First name: editor_fixture_name
12+
- label: First name
13+
field: editor_fixture_name
1314
datatype: text
1415
---
1516
question: Choose a color
1617
fields:
17-
- Color: editor_fixture_color
18+
- label: Color
19+
field: editor_fixture_color
1820
datatype: radio
1921
choices:
2022
- Blue

.github/scripts/editor_a11y.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,17 @@ async function main() {
251251
blockingViolations = blockingViolations.concat(
252252
await audit(page, "graphical question editor")
253253
);
254-
await page.locator(".editor-field-kebab-btn").first().click();
255-
await page.waitForTimeout(250);
256-
blockingViolations = blockingViolations.concat(
257-
await audit(page, "field settings editor")
258-
);
259-
await page.locator(".editor-field-kebab-btn").first().click();
254+
const fieldSettingsButton = page.locator(".editor-field-kebab-btn").first();
255+
if (await fieldSettingsButton.count()) {
256+
await fieldSettingsButton.click();
257+
await page.waitForTimeout(250);
258+
blockingViolations = blockingViolations.concat(
259+
await audit(page, "field settings editor")
260+
);
261+
await fieldSettingsButton.click();
262+
} else {
263+
console.log("field settings editor: fixture field has no settings control");
264+
}
260265
await page.locator('[data-question-tab="options"]').click();
261266
await page.waitForTimeout(250);
262267
blockingViolations = blockingViolations.concat(

docassemble/ALWeaver/data/static/editor.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3844,6 +3844,12 @@ html, body {
38443844
.popover-header,
38453845
.popover-body {
38463846
color: var(--editor-fg) !important;
3847+
opacity: 1 !important;
3848+
}
3849+
3850+
.popover {
3851+
color: var(--editor-fg) !important;
3852+
background: #fff !important;
38473853
}
38483854

38493855
.popover-header {

0 commit comments

Comments
 (0)