ZCU-PUB/Duplicate id in html#1239
Merged
milanmajchrak merged 1 commit intocustomer/zcu-pubfrom Mar 10, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Resolves an accessibility/test failure caused by duplicate id="search-navbar-container" elements on pages where the search navbar is rendered more than once (e.g., via theming).
Changes:
- Replaced the duplicated
idattribute with asearch-navbar-containerCSS class in both the base and custom theme templates. - Updated Angular unit tests to query the container by class instead of id.
- Removed the (now unnecessary) Cypress a11y exclusion comment referencing the duplicate id.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/themes/custom/app/search-navbar/search-navbar.component.html | Removes duplicated id to prevent invalid HTML and duplicate-ID detection failures. |
| src/app/search-navbar/search-navbar.component.html | Same fix in the base template to keep behavior consistent across theme/non-theme rendering. |
| src/app/search-navbar/search-navbar.component.spec.ts | Updates selectors to match the new class-based container. |
| cypress/e2e/header.cy.ts | Cleans up obsolete comment about excluding the duplicate id from a11y checks. |
Collaborator
|
@Kasinhou When you changed |
Author
no .scss references to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem description
Found duplicate id search-navbar-container
Sync verification
If en.json5 or cs.json5 translation files were updated:
yarn run sync-i18n -t src/assets/i18n/cs.json5 -ito synchronize messages, and changes are included in this PR.Manual Testing (if applicable)
Copilot review