From 676c1dadadf2f9955a2dffc542c5862a0e34c86b Mon Sep 17 00:00:00 2001 From: Lauri Eskola <lauri.eskola@acquia.com> Date: Mon, 30 Oct 2023 13:57:15 +0200 Subject: [PATCH] Issue #3040673 by bnjmnm, Gauravvvv, smustgrave, andrewmacpherson, mgifford, shaal: Audit & fix Red asterisk for required fields WCAG contrast minimum --- .../umami/css/{classy/components => components/forms}/form.css | 2 +- .../demo_umami/themes/umami/images/svg/e40000/required.svg | 1 + core/profiles/demo_umami/themes/umami/umami.libraries.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename core/profiles/demo_umami/themes/umami/css/{classy/components => components/forms}/form.css (96%) create mode 100644 core/profiles/demo_umami/themes/umami/images/svg/e40000/required.svg diff --git a/core/profiles/demo_umami/themes/umami/css/classy/components/form.css b/core/profiles/demo_umami/themes/umami/css/components/forms/form.css similarity index 96% rename from core/profiles/demo_umami/themes/umami/css/classy/components/form.css rename to core/profiles/demo_umami/themes/umami/css/components/forms/form.css index 302e279771ff..a07557d3449c 100644 --- a/core/profiles/demo_umami/themes/umami/css/classy/components/form.css +++ b/core/profiles/demo_umami/themes/umami/css/components/forms/form.css @@ -78,7 +78,7 @@ label.option { content: ""; vertical-align: super; /* Use a background image to prevent screen readers from announcing the text. */ - background-image: url(../../../../../../../misc/icons/ee0000/required.svg); + background-image: url(../../../images/svg/e40000/required.svg); background-repeat: no-repeat; background-size: 6px 6px; } diff --git a/core/profiles/demo_umami/themes/umami/images/svg/e40000/required.svg b/core/profiles/demo_umami/themes/umami/images/svg/e40000/required.svg new file mode 100644 index 000000000000..d837dbccc0ba --- /dev/null +++ b/core/profiles/demo_umami/themes/umami/images/svg/e40000/required.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#E40000" d="M0,7.562l1.114-3.438c2.565,0.906,4.43,1.688,5.59,2.35C6.398,3.553,6.237,1.544,6.22,0.447h3.511 c-0.05,1.597-0.234,3.6-0.558,6.003c1.664-0.838,3.566-1.613,5.714-2.325L16,7.562c-2.05,0.678-4.06,1.131-6.028,1.356 c0.984,0.856,2.372,2.381,4.166,4.575l-2.906,2.059c-0.935-1.274-2.041-3.009-3.316-5.206c-1.194,2.275-2.244,4.013-3.147,5.206 l-2.856-2.059c1.872-2.307,3.211-3.832,4.017-4.575C3.849,8.516,1.872,8.062,0,7.562"/></svg> diff --git a/core/profiles/demo_umami/themes/umami/umami.libraries.yml b/core/profiles/demo_umami/themes/umami/umami.libraries.yml index 1ba2f15a9cc6..25968fadb0ba 100644 --- a/core/profiles/demo_umami/themes/umami/umami.libraries.yml +++ b/core/profiles/demo_umami/themes/umami/umami.libraries.yml @@ -12,6 +12,7 @@ global: css/components/blocks/search/search-results.css: {} css/components/blocks/articles-aside/articles-aside.css: {} css/components/forms/contact.css: {} + css/components/forms/form.css: { weight: -10 } css/components/forms/content-moderation.css: {} css/components/content/node.css: {} css/components/content/full/node-full.css: {} @@ -99,7 +100,6 @@ classy.base: css/classy/components/details.css: { weight: -10 } css/classy/components/exposed-filters.css: { weight: -10 } css/classy/components/field.css: { weight: -10 } - css/classy/components/form.css: { weight: -10 } css/classy/components/icons.css: { weight: -10 } css/classy/components/inline-form.css: { weight: -10 } css/classy/components/item-list.css: { weight: -10 } -- GitLab