From 35b6a2795bb47646bdf03d657e1e0ba3622c7bd9 Mon Sep 17 00:00:00 2001 From: Trevor Pierce <1Copenut@users.noreply.github.com> Date: Thu, 6 Apr 2023 16:47:56 -0500 Subject: [PATCH] [EuiAccordion] Fixed a bug in aria-expanded for axe-core. (#6694) * Fixed a bug in `EuiAccordion` aria-expanded for axe. * Added logic check for EuiAccordion aria-expanded attr. * Adding comment for new logic reasoning. * Revising logic to only omit aria-expanded if second element is not a button. * Adding a changelog entry. * Update upcoming_changelogs/6694.md Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com> * Update upcoming_changelogs/6694.md Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com> * Update src/components/accordion/accordion.tsx Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com> * Refactoring logic inline for better readability. --------- Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com> --- src/components/accordion/__snapshots__/accordion.test.tsx.snap | 2 -- src/components/accordion/accordion.tsx | 3 ++- upcoming_changelogs/6694.md | 3 +++ 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 upcoming_changelogs/6694.md diff --git a/src/components/accordion/__snapshots__/accordion.test.tsx.snap b/src/components/accordion/__snapshots__/accordion.test.tsx.snap index 6828e9415a6..81af15442e3 100644 --- a/src/components/accordion/__snapshots__/accordion.test.tsx.snap +++ b/src/components/accordion/__snapshots__/accordion.test.tsx.snap @@ -587,7 +587,6 @@ exports[`EuiAccordion props buttonElement is rendered 1`] = `