diff --git a/cypress/e2e/state-calculator.cy.ts b/cypress/e2e/state-calculator.cy.ts index fee0123..90d0201 100644 --- a/cypress/e2e/state-calculator.cy.ts +++ b/cypress/e2e/state-calculator.cy.ts @@ -34,7 +34,9 @@ describe('template spec', () => { .find('input#zip') .type('02859{enter}'); - cy.checkA11y(); + cy.checkA11y(null, { + runOnly: ['wcag2a', 'wcag2aa'], + }); cy.get('rewiring-america-state-calculator') .shadow() diff --git a/src/calculator-form.ts b/src/calculator-form.ts index cf81198..d3c1661 100644 --- a/src/calculator-form.ts +++ b/src/calculator-form.ts @@ -89,18 +89,18 @@ export const formTemplate = ( onSubmit: (e: SubmitEvent) => void, gridClass: string = 'grid-3-2', ) => { + const labelSlot = html``; + const projectField = showProjectField ? html`
- ${multiselect({ id: 'projects', + labelSlot, required: true, options: Object.entries(PROJECTS) .map(([value, data]) => ({ value, label: data.label })) diff --git a/src/select.ts b/src/select.ts index 7be1278..624317e 100644 --- a/src/select.ts +++ b/src/select.ts @@ -72,6 +72,7 @@ export const select = ({ export const multiselect = ({ id, label, + labelSlot, currentValues, options, helpText, @@ -93,6 +94,7 @@ export const multiselect = ({ hoist multiple > + ${labelSlot ?? nothing} ${options.map(o => multioption(o))}