A discussion at today's weekly meeting pointed out how we should address accessibility review for the code we're doing for Claro. Since a full a11y sign-off will be needed for merging into Drupal core and after discussing with @andrewmacpherson the more reasonable steps are:

For individual PRs in Claro:

  • If there's an issue which has a11y notes, use our own discretion. If we feel they are all addressed, document what we have done, and go for the merge.
  • If any component has never had a11y discussion to date, let's find those and fill in the review gaps. Tag them "needs accessibility review" and ping the #a11y channel in Slack.
  • For more complex components (e.g. compound fields, anything with invisible labels, or components with custom JS), tread more cautiously and ask for a review. This also applies if bringing in 3rd-party JS libs which we don't already use in core. Tag them "needs accessibility review" and ping the #a11y channel in Slack.
CommentFileSizeAuthor
#11 button-sizes.png23.96 KBckrina

Comments

ckrina created an issue. See original summary.

andrewmacpherson’s picture

Yes, just confirming that was the private discussion we had on Slack. Good to have this recorded, so I can't complain about this later :-)

andrewmacpherson’s picture

Issue tags: -a11y

"accessibility" is the preferred tag. We're trying to avoid "a11y" as a lot of people don't understand the numeronym, and we don't want two lists to review.

andrewmacpherson’s picture

Issue summary: View changes

Added a bit more about the "more complex components".

If merging something on your own discretion, please add some notes about how/what was done to address a11y.

modulist’s picture

icons for Claro
WCAG 2.1 AAA specifies a minimum size of 44 x 44px for target areas. AAA goes beyond the legal minimum for compliance. If that size is not feasible, then I would recommend that we set a minimum of 36 x 36px for the admin UI, if not 24 x 24px.

Material Design sets their icons inside of a 24 x 24px square by default. See https://material.io/design/iconography/system-icons.html#grid-keyline-sh...

modulist’s picture

Claro primary and default buttons

The outline color for the focus and hover states are too close to the primary button color to be easily visible. I would recommend using something close Drupal's lime green (#7cbc48) as the outline color for the primary color.

saschaeggi’s picture

@modulist thanks for the feedback. We'll have a look into it. Do icons which are just decoration also need to be > 24px?

andrewmacpherson’s picture

@saschaeggi - by "an icon which is just decoration", you mean the icons which accompany a visible text label, in our current toolbar?

Note that the WCAG Target Size success criterion isn't about the size of the icon itself, but the size of the operable control as a whole. We'd need to assess those in context of the page as a whole. A 24px icon inside a button which had padding and borders adding up to 44px would satisfy WCAG Target Size. In the example I gave of icons in our current toolbar module design, the size of the icon doesn't matter, it's the height of the toolbar that matters. Currently it's 39px, which doesn't pass. The buttons from the contextual links module don't pass either.

This is at AAA, beyond our target of AA, so it can be triaged as nice-to-have. It's really just a formalization of an existing practice in mobile design. WCAG Target size has an exemption for targets that are inside of sentences, as that would disrupt the line height. So a help icon link at the end of a form description would be exempt.

Aside: why do we need four sizes of drop-down arrow? That seems a bit excessive, but it would be useful to know the intended context they will appear in.

andrewmacpherson’s picture

#6 - the palette in [33017785] doesn't have a lime green - Claro isn't intended to match the Bluecheese theme of drupal.org afaik.

I agree the blue focus outline around a blue button is hard to see. It's too similar to Chrome's crappy user-agent style. I don't think we'll really solve the focus style with colour though. An offset outline would be clearer, but will need a polyfill for IE11 (and maybe Edge?)

The problem with a focus indicator that butts directly against the button, is it needs to be distinguishable from both the button itself, and the page background. An offset focus outline only needs to have contrast against the page background. I have a demo page to show outline-offset focus styles, try tabbing through all the controls there.

ckrina’s picture

I just posted a proposal for buttons in the buttons issue so we can discuss it there: https://www.drupal.org/project/claro/issues/3021087#comment-12931235

ckrina’s picture

Issue summary: View changes
StatusFileSize
new23.96 KB

About icons: so far the specification in Figma is just for the designs to create/export svgs and to design new icons. We'll take that into account when we define the proper style guide and we'll definitely add this WCAG info. Thanks!

About dropdowns, we have 3 sizes: normal, small, extra small. The normal is the one we can find in the save button on a node edit form. The other ones are the ones placed, for example, inside tables where we try to reduce its space&importance/priority.

modulist’s picture

In Figma, the best way to create transparent icons with the correct target areas is to create 24px x 24px frames with no background, and often I will create all the states in various frames layered inside of a parent frame.

huzooka’s picture

Project: Claro » Drupal core
Version: 8.x-1.x-dev » 8.9.x-dev
Component: Documentation » Claro theme

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

finnsky’s picture

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mgifford’s picture

Issue tags: +wcag255

Tagging for 2.5.5

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Status: Active » Fixed

Reading the issue summary I think this can be closed now. Claro was added to core and there are numerous issues tagged 'Accessibility'.

Therefore closing this as fixed. If that is wrong I trust someone will re-open this.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.