Skip to content

[Port to dtq-dev] Accessibility existing issues all#1300

Open
kosarko wants to merge 1 commit into
dataquest-dev:dtq-devfrom
ufal:backport-139-to-dtq-dev
Open

[Port to dtq-dev] Accessibility existing issues all#1300
kosarko wants to merge 1 commit into
dataquest-dev:dtq-devfrom
ufal:backport-139-to-dtq-dev

Conversation

@kosarko
Copy link
Copy Markdown

@kosarko kosarko commented Jun 5, 2026

Port of ufal#139 by @amadulhaxxani to dtq-dev.

Summary by CodeRabbit

  • New Features

    • Enhanced metadata rendering with proper language attributes for better accessibility and semantic markup.
  • Accessibility Improvements

    • Added aria-label attributes to buttons and interactive elements throughout the interface.
    • Added aria-hidden attributes to decorative icons.
    • Updated pagination info section with live region announcements.
  • UI/Layout Updates

    • Footer section headings restructured with improved layout and spacing.
    • Homepage carousel slides redesigned with updated heading hierarchy.
    • File section header element updated for improved semantics.
    • Toggle icons refreshed for views and downloads metrics.

* 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)
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 5, 2026

Review Change Stack

Warning

Review limit reached

@kosarko, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1b894274-debe-4bbe-9f7b-05d7656c04b3

📥 Commits

Reviewing files that changed from the base of the PR and between a616eaf and 7d6b072.

📒 Files selected for processing (40)
  • src/app/clarin-navbar-top/clarin-navbar-top.component.html
  • src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal-volume/journal-volume-search-result-grid-element.component.html
  • src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal/journal-search-result-grid-element.component.html
  • src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/project/project-search-result-grid-element.component.html
  • src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.html
  • src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.spec.ts
  • src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/org-unit/org-unit-sidebar-search-list-element.component.ts
  • src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.html
  • src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.spec.ts
  • src/app/footer/footer.component.html
  • src/app/footer/footer.component.scss
  • src/app/home-page/home-page.component.html
  • src/app/item-page/clarin-files-section/clarin-files-section.component.html
  • src/app/item-page/edit-item-page/item-delete/item-delete.component.html
  • src/app/item-page/field-components/metadata-values/metadata-values.component.html
  • src/app/item-page/field-components/metadata-values/metadata-values.component.spec.ts
  • src/app/item-page/field-components/metadata-values/metadata-values.component.ts
  • src/app/item-page/full/field-components/file-section/full-file-section.component.html
  • src/app/item-page/full/field-components/file-section/full-file-section.component.spec.ts
  • src/app/item-page/simple/field-components/clarin-description-item-field/clarin-description-item-field.component.html
  • src/app/item-page/simple/field-components/clarin-description-item-field/clarin-description-item-field.component.ts
  • src/app/item-page/views-downloads-statistics/views-downloads-statistics.component.html
  • src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.html
  • src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html
  • src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts
  • src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.html
  • src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.spec.ts
  • src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.html
  • src/app/shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component.spec.ts
  • src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html
  • src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.ts
  • src/app/shared/pagination/pagination.component.html
  • src/app/shared/shared.module.ts
  • src/app/shared/utils/ds-lang.pipe.spec.ts
  • src/app/shared/utils/ds-lang.pipe.ts
  • src/app/shared/utils/metadata-language.util.spec.ts
  • src/app/shared/utils/metadata-language.util.ts
  • src/app/submission/sections/cc-license/submission-section-cc-licenses.component.html
  • src/assets/i18n/cs.json5
  • src/assets/i18n/en.json5

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants