Skip to content

UHF-11609: Small accessibility fixes for content cards and announcement#1221

Merged
teroelonen merged 3 commits intomainfrom
UHF-11609
Mar 18, 2025
Merged

UHF-11609: Small accessibility fixes for content cards and announcement#1221
teroelonen merged 3 commits intomainfrom
UHF-11609

Conversation

@teroelonen
Copy link
Contributor

@teroelonen teroelonen commented Mar 14, 2025

UHF-11609

What was done

  • Fix styles on announcement so that the closing button doesn't shrink.
  • Add check around content cards block that makes sure that it doesn't get printed for anonymous users if there is no published content inside it.

How to install

  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the HDBT theme
    • composer require drupal/hdbt:dev-UHF-11609
  • Update the Helfi Platform config
    • composer require drupal/helfi_platform_config:dev-UHF-11609
  • Run make drush-cr

How to test

  • Add an announcement for the site and make sure to add a lot of lorem ipsum to the content field. Save it and go view it.
  • The close button should now always remain 48px x 48px even if there is plenty of text and in all screen sizes.
  • Go to a basic page and add a Content Cards paragraph to the end of the page. Add two content references. Save the node.
  • Now go edit the referenced content and unpublish one of them.
  • Go back to the node that references the nodes and as an admin you should still see the block on the node with one of the content unpublished.
  • When you view the content as anonymous user you should still see the block as well and the unpublished node shouldn't be visible. NOTICE: there could be a case that if the node that you unpublished still has published OTHER language version of it available that that is shown for the anonymous user instead of the unpublished language version but this is not in the scope of this issue and it can be avoided by simply removing the unpublished node reference from the language version that doesn't have the wanted language version available.)
  • Now go edit the one referenced node that was still published. Unpublish that one as well and check that you don't see the block anymore as anonymous user and that the admin can still see it.
  • Maybe test with some language version variations as well.
  • Check that code follows our standards.

Continuous documentation

  • This feature has been documented/the documentation has been updated
  • This change doesn't require updates to the documentation

Other PRs

@github-actions
Copy link

⚠️ Visual regression found! Please check if this change is wanted or accidental. You can check the output here: https://city-of-helsinki.github.io/drupal-hdbt-visual-regression/pull/1221/html_report/

@github-actions
Copy link

⚠️ Visual regression found! Please check if this change is wanted or accidental. You can check the output here: https://city-of-helsinki.github.io/drupal-hdbt-visual-regression/pull/1221/html_report/

@teroelonen teroelonen merged commit 3e1e246 into main Mar 18, 2025
2 checks passed
@teroelonen teroelonen deleted the UHF-11609 branch March 18, 2025 07:12
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