wet-boew / wet-boew-styleguide

A style guide for the Web Experience Toolkit.
http://wet-boew.github.io/wet-boew-styleguide/index-en.html
35 stars 32 forks source link

Legislation - Replace element "em" by "cite" (accessibility) #75

Open duboisp opened 10 years ago

duboisp commented 10 years ago

Hi,

It was brought to my attention that

As per WCAG 2.0, when coding names of Acts and legislation, the <cite> tag needs to be used (when providing a citation or a reference to other sources).

The <em> tag should only be used to indicate emphasis.

However, we noticed that the Writing Guide, Legislation was coded using the <em> tag for "“Income Tax Act”" instead of the <cite> tag. We think that this should be changed to <cite> to meet accessibility requirements.

But before to change it, I observed that text into <cite> are not rendered in italics. Is that should be his style? Because for WET 3.1 the text in <cite> are rendered in italics.

:smile:

cfarquharson commented 10 years ago

@duboisp good catch. I can look at switching the <em> to <cite>, as I`m making other changes.

@pjackson28 should the <cite> be make italic in the WET CSS?

pjackson28 commented 10 years ago

@cfarquharson No, because that assumes only legislation will ever be cited. We shouldn't be forcing italics where it is not needed (such as 3rd party publications).

duboisp commented 10 years ago

@pjackson28 how should it be coded?

davidasselin commented 10 years ago

@pjackson28 What do you mean by cited? Like in using <cite>? Or as a quote/citation?

Can you elaborate?

According to http://www.w3.org/TR/html5/text-level-semantics.html#the-cite-element, cite is used to mark a reference. Most of the time, a reference's title should be in italic, but not an author's name. (Both should be using <cite> according to the specs. Is that what you meant as "where it's not needed"?

davidasselin commented 10 years ago

@duboisp @pjackson28 Also, I was wondering, since cite refers to a creative work, why would this apply to an act? Is this an oversight of the spec? Why wouldn't they use publications/document or be less generic when talking about references if something like an act is bound to be fitting in this?

pjackson28 commented 10 years ago

@davidasselin I was referring to using the cite element, which you can include in a blockquote or inline with a q element to provide a programmatic reference to the source material. So yes, there are cases where italics are not appropriate for the contents of a cite element, and those cases can vary according to cultures and conventions, which is why we can't apply that style globally to the cite element.

As for an act, it is in essence a creative work of a government organization, which along with other creative works is subject to copyright. Acts may not have been explicitly included in the non-exhaustive list of creative work examples provided by the HTML5 spec but it is by no means excluded and is still a creative work according to copyright legislation.

@duboisp The HTML5 spec provides some good examples of how to use cite.

duboisp commented 10 years ago

@pjackson28 My question was more about the use case of a web editor that need to code the reference of legislation in a webpage published with the GC web theme.

Do that web editor will code the legislation like:

in order to be conform with The Canadian Style and have it rendered like: Income Tax Act

Thanks

:smile:

pjackson28 commented 10 years ago

@duboisp You should use the i element to convey the relevant semantics programmatically (since using CSS alone will not convey the semantics programmatically).

duboisp commented 10 years ago

Thanks for the answer @pjackson28

sviens commented 9 years ago

Doing some housekeeping. Can this issue be closed? cc/ @duboisp @pjackson28 @cfarquharson @davidasselin

Wenifred commented 9 years ago

The latest WET (v4.0.11) renders the <cite> element in italics. It's a change in Bootstrap: https://github.com/twbs/bootstrap/commit/9677c95d83f361b7c3a43e56ef89590305c84905

Do we still code it like: <cite><i>Income Tax Act</i></cite> What about if it is an author and not a publication, act..etc.?

RobJohnston commented 7 years ago

The page referenced by @duboisp is now a dead link. Could it now be https://www.tbs-sct.gc.ca/hgw-cgf/oversight-surveillance/communications/csc-grc-eng.asp#wp2-7?

If so, there is no <cite> tag in the example anymore and there's a whole big discussion about italics in https://github.com/wet-boew/wet-boew/issues/7631. Time to close this?