From fe13768e8b9fdb768126363744383083727b500b Mon Sep 17 00:00:00 2001 From: Alexander Ackermann Date: Wed, 21 Oct 2026 15:52:10 +0200 Subject: [PATCH 01/16] fix: improve a11y semantics of search, spaces list and space header --- .../OcSearchBar/OcSearchBar.spec.ts | 14 +++ .../components/OcSearchBar/OcSearchBar.vue | 11 +- .../src/components/Spaces/SpacesList.vue | 7 +- .../unit/components/Spaces/SpacesList.spec.ts | 10 ++ .../src/components/Spaces/SpaceHeader.vue | 6 +- .../components/Spaces/SpaceHeader.spec.ts | 9 ++ .../__snapshots__/SpaceHeader.spec.ts.snap | 2 +- .../web-app-search/src/portals/SearchBar.vue | 118 ++++++++++++++---- .../tests/unit/portals/SearchBar.spec.ts | 91 +++++++++++++- .../SideBar/Spaces/Details/SpaceDetails.vue | 10 +- .../Spaces/Details/SpaceDetails.spec.ts | 7 ++ .../__snapshots__/SpaceDetails.spec.ts.snap | 4 +- .../objects/app-files/resource/search.ts | 2 +- .../objects/app-files/search/actions.ts | 2 +- 14 files changed, 247 insertions(+), 46 deletions(-) diff --git a/packages/design-system/src/components/OcSearchBar/OcSearchBar.spec.ts b/packages/design-system/src/components/OcSearchBar/OcSearchBar.spec.ts index 6149720c6a6..9f16a83e54d 100644 --- a/packages/design-system/src/components/OcSearchBar/OcSearchBar.spec.ts +++ b/packages/design-system/src/components/OcSearchBar/OcSearchBar.spec.ts @@ -138,6 +138,20 @@ describe('OcSearchBar', () => { const searchInput = wrapper.find(selectors.searchInput) expect(searchInput.attributes('placeholder')).toBe('Start typing..') }) + it('should pass the input attributes to the input', () => { + const wrapper = getWrapper({ + inputAttributes: { + role: 'combobox', + 'aria-expanded': true, + 'aria-activedescendant': 'option-1' + } + }) + const searchInput = wrapper.find(selectors.searchInput) + expect(searchInput.attributes('role')).toBe('combobox') + expect(searchInput.attributes('aria-expanded')).toBe('true') + expect(searchInput.attributes('aria-activedescendant')).toBe('option-1') + expect(searchInput.attributes('aria-label')).toBe('Test search label') + }) it('should emit input event on typing', async () => { const wrapper = getWrapper() const searchInput = wrapper.find(selectors.searchInput) diff --git a/packages/design-system/src/components/OcSearchBar/OcSearchBar.vue b/packages/design-system/src/components/OcSearchBar/OcSearchBar.vue index dd9a151c135..e85cc2eeb77 100644 --- a/packages/design-system/src/components/OcSearchBar/OcSearchBar.vue +++ b/packages/design-system/src/components/OcSearchBar/OcSearchBar.vue @@ -6,6 +6,7 @@ >