Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making quotes semantic to encourage inclusive design #351

Closed
kirsty-hames opened this issue Aug 30, 2022 · 4 comments · Fixed by #370
Closed

Making quotes semantic to encourage inclusive design #351

kirsty-hames opened this issue Aug 30, 2022 · 4 comments · Fixed by #370

Comments

@kirsty-hames
Copy link
Contributor

Representing quotes with CSS styling alone is not identified by a screen reader. The text will read as any other body text on the page regardless how different the visual styling is.

For inclusive design, quote content should be wrapped in either <blockquote> or <q> tags. https://www.w3.org/TR/WCAG20-TECHS/H49.html

<blockquote> should be used for long quotations which may require paragraph breaks.

<q> should be used for shorter quotation.

Currently we don't have any Adapt styling for <blockquote> or <q> but styles are inherited via the browser.

blockquote

We have the option to reset/set a base style for these or even use the existing .pull-quote-body class? I'd be keen to get thoughts on this.

I would avoid using .pull-quote-title and .pull-quote-body as suggested in text.less for the reasoning above. Quotes should be limited to body text only and not used in titles.

@guywillis
Copy link
Contributor

Fully agree with your points above, @kirsty-hames

The resources section of your w3 link above links through to a page with a bit more detail on styling requirements of both <blockquote> and <q> tags - https://www.w3.org/TR/html4/struct/text.html#h-9.2.2

To summarise

  • <blockquote> is for longer quotes. This tag can contain other html tags like <p>, <h2>, <ul>
  • <q> is for shorter, inline, quotes. This tag should not contain other html tags but can contain nested q tags

As you rightly mention, we should move towards applying the correct html tags and away from stylised title / body elements. This leads me onto other quote related tags such as <cite>, <figure>, and <figcaption>.

Confusingly, there are two types of cite - an attribute and a html tag.

The cite attribute can be used by blockquotes and q tags to designate "...a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote." - blockquote / q - the trouble with the cite attribute though, is that it is hidden visually from the user.

The cite tag works in much the same way as the attribute and is used to "...describe a reference to a cited creative work, and must include the title of that work." - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite - Whether the <cite> should be used to attribute authors directly is quite contentious with mdn stating "It's worth noting that the W3C specification says that a reference to a creative work, as included within a element, may include the name of the work's author. However, the WHATWG specification for says the opposite: that a person's name must never be included, under any circumstances."

All this leads me to <figure> and <figcaption>. The figure tag allows us to create self-contained content that can contain an attribution to an author in the form of the figcaption tag and could be the solution to creating semantically correct mark up for quoting - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure#quotations

Example:

<figure>
  <q>I am a quote from a person</q>
  <figcaption>Joe Bloggs</figcaption>
</figure>

Screenshot 2022-11-10 at 16 04 54

@guywillis
Copy link
Contributor

It looks like a pull quote has a 'relatively' straight forward implementation as "...a pullquote is a direct repetition of text in the current document. As a result, authors must ensure that the presentational occurrence is hidden from users of assistive technologies (e.g., using the aria-hidden attribute)." reference

As such, I believe the following example is semantically appropriate for all audiences:

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque cursus suscipit ex a placerat.</p>
<aside role="doc-pullquote presentation" aria-hidden="true">
  Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</aside>

"doc-pullquote is typically used on blockquote, aside and div elements when the quote is duplicated in a separate element. The addition of an aria-hidden attribute in these cases prevents the content from being read again to users of assistive technologies.

Note: the ARIA 1.1 specification currently advises adding the backup role of presentation until support for none becomes more prevalent. As doc-pullquote inherits from none, the same advice applies for this role." reference

@guywillis
Copy link
Contributor

Further to the above, the pull quote can have a custom class applied to it so that it will inherit some base Vanilla styling

<aside class='aside-pull-quote' role="doc-pullquote presentation" aria-hidden="true">
  ...
</aside>

The custom class ties into colour variables defined in _colors.less and font variables defined in _font-config.less. The aside-pull-quote styles are defined in global.less. The screen shot below showcases the standard display:

Screenshot 2022-11-29 at 10 42 46

Repository owner moved this from Assigned to Recently Released in adapt_framework: The TODO Board Dec 7, 2022
github-actions bot pushed a commit that referenced this issue Dec 7, 2022
# [9.0.0](v8.1.2...v9.0.0) (2022-12-07)

### Breaking

* Quote styling rework (fixes #351) (#370) ([499412e](499412e)), closes [#351](#351) [#370](#370)
@github-actions
Copy link

github-actions bot commented Dec 7, 2022

🎉 This issue has been resolved in version 9.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to redwoodperforms/adapt-contrib-vanilla that referenced this issue Jul 10, 2023
# [7.0.0](v6.0.0...v7.0.0) (2023-07-10)

### Breaking

* block padding property (fixes adaptlearning#358) (adaptlearning#359) ([aa8a3b4](aa8a3b4)), closes [adaptlearning#358](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/358) [adaptlearning#359](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/359) [adaptlearning#358](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/358)
* Moved background images into their own divs (adaptlearning#334) ([1a8a9b6](1a8a9b6)), closes [adaptlearning#334](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/334)
* Quote styling rework (fixes adaptlearning#351) (adaptlearning#370) ([499412e](499412e)), closes [adaptlearning#351](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/351) [adaptlearning#370](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/370)

### Chore

* Updated GHA packages for release process (adaptlearning#441) ([ac2c8ca](ac2c8ca)), closes [adaptlearning#441](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/441)

### Docs

* Removed accordion / hotgraphic item image classes (fixes adaptlearning#365) ([446d923](446d923)), closes [adaptlearning#365](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/365)
* Updated readMe and example.json (fixes adaptlearning#345) (adaptlearning#371) ([265cdc9](265cdc9)), closes [adaptlearning#345](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/345) [adaptlearning#371](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/371)

### Fix

* Add @shadow-opacity (adaptlearning#425) ([24e022e](24e022e)), closes [adaptlearning#425](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/425)
* Add font size variable for nav button label (fixes adaptlearning#414) ([0a9c548](0a9c548)), closes [adaptlearning#414](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/414)
* Add missing xlarge to vanilla theme (adaptlearning#432) ([3614bf5](3614bf5)), closes [adaptlearning#432](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/432)
* Add new menu header color variables (fixes adaptlearning#402) ([23f4ac3](23f4ac3)), closes [adaptlearning#402](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/402)
* Add variable for .on-screen-anim() mixin's transition-delay (fixes adaptlearning#416) ([ca68ffd](ca68ffd)), closes [adaptlearning#416](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/416)
* Added gitignore for release automation (adaptlearning#347) ([5c7d9b5](5c7d9b5)), closes [adaptlearning#347](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/347)
* Added missing defaults for comp header bg mixin (fixes adaptlearning#374) ([00c28b9](00c28b9)), closes [adaptlearning#374](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/374)
* Added missing header-color default (fixes: adaptlearning#372) ([62af1d8](62af1d8)), closes [adaptlearning#372](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/372)
* Added release automation (adaptlearning#344) ([8d7237a](8d7237a)), closes [adaptlearning#344](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/344)
* Added slider fill and marking styling (fixes adaptlearning#407) (adaptlearning#408) ([992d162](992d162)), closes [adaptlearning#407](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/407) [adaptlearning#408](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/408)
* Added textinput item bottom margin (adaptlearning#421) ([f306206](f306206)), closes [adaptlearning#421](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/421)
* align-vert-center to work with block min-heights (adaptlearning#405) ([aef4e21](aef4e21)), closes [adaptlearning#405](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/405)
* Bump http-cache-semantics from 4.1.0 to 4.1.1 (adaptlearning#392) ([c6670db](c6670db)), closes [adaptlearning#392](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/392)
* convert item and button borders from px to rem (fixes adaptlearning#436) (adaptlearning#437) ([3828504](3828504)), closes [adaptlearning#436](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/436) [adaptlearning#437](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/437)
* Convert the default instruction text styling from italics to bold (adaptlearning#438) ([a1e2992](a1e2992)), closes [adaptlearning#438](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/438)
* Defensive Check (fixes: adaptlearning#400) (adaptlearning#401) ([c51c0f8](c51c0f8)), closes [adaptlearning#400](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/400) [adaptlearning#401](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/401)
* Make Notify icon buttons dark in initial state, darker in hover (fixes adaptlearning#250) ([82c9181](82c9181)), closes [adaptlearning#250](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/250)
* Match columns to breakpoints (adaptlearning#429) ([61ad869](61ad869)), closes [adaptlearning#429](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/429)
* Remove hover states from progress indicators (adaptlearning#399) ([5c98ce2](5c98ce2)), closes [adaptlearning#399](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/399)
* Removed rangeslider styling (adaptlearning#406) ([2627896](2627896)), closes [adaptlearning#406](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/406)
* Replace glossary textbox margin with padding (adaptlearning#409) ([106a2cf](106a2cf)), closes [adaptlearning#409](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/409)
* Slider fill styling (adaptlearning#413) ([a2531ae](a2531ae)), closes [adaptlearning#413](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/413)
* Small theme file shake up (fixes adaptlearning#331) (adaptlearning#384) ([5d99c00](5d99c00)), closes [adaptlearning#331](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/331) [adaptlearning#384](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/384)
* update margins on menu-body and menu-instruction (fixes adaptlearning#387) ([77f0560](77f0560)), closes [adaptlearning#387](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/387)
* Version numbers removed from Readme files ([5f4e68a](5f4e68a))

### New

* Add @body-background-color and apply to body element (fixes adaptlearning#349) ([68b4e1d](68b4e1d)), closes [adaptlearning#349](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/349)
* Add block horizontal alignment option (fixes adaptlearning#393) ([501adcb](501adcb)), closes [adaptlearning#393](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/393)
* Added favicon support (fixes adaptlearning#306) (adaptlearning#396) ([fe46c7e](fe46c7e)), closes [adaptlearning#306](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/306) [adaptlearning#396](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/396)
* Added hotgraphic visited icon (adaptlearning#336) ([7c1145e](7c1145e)), closes [adaptlearning#336](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/336)
* Adds locking icon to locked menu items (fixes: adaptlearning#389) (adaptlearning#390) ([4301511](4301511)), closes [adaptlearning#389](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/389) [adaptlearning#390](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/390)
* Issue and pr project addition automation (refs adaptlearning/adapt_framework#3315) (adaptlearning#343) ([3a7a955](3a7a955)), closes [adaptlearning#343](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/343)
* Text alignment update (fixes adaptlearning#362) (adaptlearning#364) ([a13e2f0](a13e2f0)), closes [adaptlearning#362](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/362) [adaptlearning#364](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/364)

### Update

* component vertical alignment property (fixes adaptlearning#353) (adaptlearning#354) ([31c46f9](31c46f9)), closes [adaptlearning#353](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/353) [adaptlearning#354](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/354)
* Control content max width via variable (fixes adaptlearning#379) (adaptlearning#380) ([d4b3f99](d4b3f99)), closes [adaptlearning#379](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/379) [adaptlearning#380](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/380)
* Convert focus to focus-visible (fixes adaptlearning#376 adaptlearning#377) (adaptlearning#378) ([7d93d24](7d93d24)), closes [adaptlearning#376](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/376) [adaptlearning#377](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/377) [adaptlearning#378](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/378)
* Extend columns to support menu item widths (fixes adaptlearning#383) ([5af105c](5af105c)), closes [adaptlearning#383](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/383)
* replace notify button icon duplicate styles with mixin (fixes adaptlearning#443) (adaptlearning#448) ([bf2f2e6](bf2f2e6)), closes [adaptlearning#443](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/443) [adaptlearning#448](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/448)

### Upgrade

* Bump yaml and semantic-release (adaptlearning#422) ([579cc13](579cc13)), closes [adaptlearning#422](https://github.com/redwoodperforms/adapt-contrib-vanilla/issues/422)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants