This is an automated email from the ASF dual-hosted git repository. eschutho pushed a commit to branch fix/a11y-embedcode-input-labels in repository https://gitbox.apache.org/repos/asf/superset.git
commit 5d3d8935c37b605dc7d17ad5cde7a52656660e40 Author: Elizabeth Thompson <[email protected]> AuthorDate: Mon Jul 13 10:24:19 2026 +0000 fix(a11y): add aria-label to EmbedCodeContent height/width inputs WCAG 2.1 SC 1.3.1 — Level A. --- superset-frontend/src/explore/components/EmbedCodeContent.test.tsx | 6 ++++++ superset-frontend/src/explore/components/EmbedCodeContent.tsx | 2 ++ 2 files changed, 8 insertions(+) diff --git a/superset-frontend/src/explore/components/EmbedCodeContent.test.tsx b/superset-frontend/src/explore/components/EmbedCodeContent.test.tsx index 7cf4b61369a..b726a11f70c 100644 --- a/superset-frontend/src/explore/components/EmbedCodeContent.test.tsx +++ b/superset-frontend/src/explore/components/EmbedCodeContent.test.tsx @@ -51,4 +51,10 @@ describe('EmbedCodeButton', () => { }), ).toBeVisible(); }); + + test('height and width inputs have accessible names', async () => { + render(<EmbedCodeContent formData={mockFormData} />, { useRedux: true }); + expect(await screen.findByLabelText('Chart height')).toBeVisible(); + expect(await screen.findByLabelText('Chart width')).toBeVisible(); + }); }); diff --git a/superset-frontend/src/explore/components/EmbedCodeContent.tsx b/superset-frontend/src/explore/components/EmbedCodeContent.tsx index deda9002a97..01330e12820 100644 --- a/superset-frontend/src/explore/components/EmbedCodeContent.tsx +++ b/superset-frontend/src/explore/components/EmbedCodeContent.tsx @@ -143,6 +143,7 @@ const EmbedCodeContent: FC<EmbedCodeContentProps> = ({ defaultValue={height} name="height" onChange={handleInputChange} + aria-label={t('Chart height')} /> </div> <div> @@ -153,6 +154,7 @@ const EmbedCodeContent: FC<EmbedCodeContentProps> = ({ name="width" onChange={handleInputChange} id="embed-width" + aria-label={t('Chart width')} /> </div> </Space>
