[Port to dtq-dev] Accessibility existing issues all#1300
Conversation
* Add lang attributes to description fields Set HTML lang attributes based on metadata language for various description and metadata display elements to improve i18n and accessibility. Updated templates to bind [attr.lang] on spans, links and browse links; metadata-values now passes mdValue.language into render templates; clarin description component now emits per-entry language and value pairs; ClarinItemBoxView stores itemDescriptionLang; SidebarSearchListElement supports descriptionLang with a getDescriptionLang() hook and OrgUnit implementation returns the description language. These changes ensure displayed metadata uses the correct language attribute when available. * Improve accessibility: add ARIA labels & i18n keys Add ARIA attributes and move icon markup to improve screen-reader support across several components. Updated templates to include aria-label on interactive buttons (info, calendar, remove/save/delete/clear actions) and aria-hidden on decorative <i> icons. Adjusted calendar button markup to place the calendar icon inside the button element. Added corresponding i18n keys in many locale JSON5 files so the new labels are translatable (English provided and placeholder entries added across locales; some locales include TODO notes for translation). These changes are focused on accessibility and localization support. * Improve accessibility and semantic headings Replace several presentational heading tags with semantically appropriate heading levels (convert h4/h3/h5/h6 to h2/h3 with existing styling classes) across home, footer and item templates to improve document structure. Add aria-hidden to the hidden repository link and aria-live/aria-atomic to the pagination info for better accessibility. Update footer markup to group links into separate ULs (removing BRs) and adjust SCSS selectors to target both heading elements and .h4 class, plus spacing for stacked lists. Also add TranslateModule.forRoot() to an existing-relation-list-element spec to satisfy translations in tests. * Update cs translations: relation group, license Replace English strings with Czech translations in src/assets/i18n/cs.json5 for the following keys: form.relation-group.save, form.relation-group.delete, form.relation-group.clear, and submission.cc-license.field-info. Improves localization for relation-group actions and the CC license field. * Mark decorative paperclip icon aria-hidden Accessibility tweak: add aria-hidden="true" to the Font Awesome paperclip icon so screen readers ignore the decorative icon. Also replace the non-breaking space inside the <i> tag with a regular space between the icon and the heading text in clarin-files-section.component.html. * Normalize metadata language to BCP 47 for HTML lang attributes PR #139 binds [attr.lang] straight from the DSpace metadata language field, which is stored as Java-style locales (en_US, cs_CZ) or the wildcard *. None of those are valid BCP 47 / HTML lang values, so assistive technology ignores them and the accessibility improvement is inert for the common stored values. Add a single shared metadataLangToBcp47() helper (*/empty/nullish -> null, "_" -> "-") and a thin dsLang pipe that delegates to it. Route all of PR #139's lang bindings through it: the pipe in the seven templates, the helper directly in the three .ts sites. Declare DsLangPipe in the specs that render the pipe (NO_ERRORS_SCHEMA does not suppress missing pipes), including the shared grid element test factory. Add unit specs for the helper and pipe plus a DOM assertion that en_US renders as lang="en-US". * Translate remaining English strings to Czech in cs.json5 --------- Co-authored-by: Ondřej Košarko <kosarko@ufal.mff.cuni.cz> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> (cherry picked from commit cd1c617)
|
Warning Review limit reached
More reviews will be available in 26 minutes and 33 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (40)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Port of ufal#139 by @amadulhaxxani to
dtq-dev.Summary by CodeRabbit
New Features
Accessibility Improvements
aria-labelattributes to buttons and interactive elements throughout the interface.aria-hiddenattributes to decorative icons.UI/Layout Updates