Warning:
This wiki has been archived and is now read-only.

AddedAttributeQuotationMarks

From HTML WG Wiki
Jump to: navigation, search

New markup attribute on Q and BLOCKQUOTE: "marks"

Corresponds to issue number 48


Problem statement / use cases

The current disparity among UA implementations regarding the Q element also reflects a dual authoring approach to quotations. One group of authors sees quotations like other semantic punctuation and therefore rightly belonging in the HTML document surrounding quotation elements. Another group of authors shares the HTML 4.01 perspective that quotation marks are not like other punctuation, but should be added through styling mechanisms that is sensitive to contextual styling rules for a user or author.

  • Some authors see quotation marks as mere punctuation while other authors see punctuation as a matter of style
  • The differences over quotation marks as punctuation versus style is reflected in interoperability of major browsers
  • Some browsers do not have sufficient CSS support for styling quotations

Proposed solutions

Summary

  • add a @marks markup attribute to Q and BLOCKQUOTE with the enumerated data type value of either 'provided' or needed'
  • add a corresponding DOM attribute to access the @marks markup attribute
  • the default value is 'needed' indicating quotation marks should be added by styling mechanisms.
  • add aural UA conformance requirement to ignore Unicode general categories Pi, and Pf, and optionally ignore Ps, and Pe when speaking a Q or BLOCKQUOTE elements contents (users should be provided with a mechanism to turn off this feature).

Details

The current HTML5 draft does not provide a norm on quotation marks at all, however the HTML 4.01 recommendation calls for authors to leave quotations out of the HTML markup.

”Visual user agents must ensure that the content of the Q element is rendered with delimiting quotation marks. Authors should not put quotation marks at the beginning and end of the content of a Q element” (HTML 4.01).

There are certainly reasons to follow the HTML 4.01 approach as the style of quotations can vary from one publisher to another. However, even after all these years HTML and CSS do not yet provide a way to style quotations according to common publishing conventions. In other languages the expression of a quotation may not even depend upon its length. To accomdate authors who would like to author HTML with quotation marks included this proposal recommends adding a @marks attribut to both the Q element and the BLOCKQUOTE element, with a corresponding DOM attribute 'marks' to access the value.

The value of @marks would be an enumerated type and would take either the value 'needed' or the value 'provided'. For compatibility with HTML 4.01 conforming UAs, the default value must be 'needed'. Also, this makes the Q element with 'needed' as the default the most compact form of a quotation. In other words no attribute is required and the author does not have to provide the quotation marks either.

When the value of @marks is set to 'provided' authors must include the appropriate quotation marks immediately outside the Q element (not inside as is common practice). This further strengthens the Q elements contents as a direct quotation from the source. Similarly, punctuation needed to adorn the quotation, but not part of the original quotation should similarly occur outside the Q (or BLOCKQUOTE)element.

Aural UA conformance norms

"Aural UAs must ignore quotation marks whenever encountered on the boundary of a quotation element (Q, QUOTE or BLOCKQUOTE). In particular any sequence of one or more characters in the Unicode general categories Pi and Pf must be ignored and those in the general categories Ps and Pe may be ignored, whether these characters appear immediately prior to the quotation tag or immediately after the quotation tag without any intervening whitespace. Whenever these characters are added by stylesheet targeting aural media, those characters should not be ignored."

Liaison with CSS3 WG

Some support from CSS might be required to add a property to reverse the order of trailing punctuation and ::after auto-generated contents. Semantically, the trailing punctuation added by authors to quotations should be outside the quotation element. However, some style guidelines call for the trailing quotation mark to wrap this trailing punctuation. CSS should add some support for this styling convention.

The issue of adding punctuation at the end of quotations that are not a part of the original quoted text is likely a


<p>A spokesperson said <q cite='urn:someurn' >This is the largest recorded attendance this year</q>, topping even the record championship attendance last year.
</p>

which might be rendered according to various style manuals as

A spokesperson said “This is the largest recorded attendance this year”, topping even the record championship attendance last year.

or

A spokesperson said “This is the largest recorded attendance this year,” topping even the record championship attendance last year.

However this distinction arises due to typewriter legacy for manuscript submission (which style manuals largely address) and the desire of typesetters to preserve the quotation semantics yet also present aesthetically pleasing typesetting. In other words, the placement of punctuation after quotations marks (quote",) looks unpleasing while the placement of punctuation inside quotations marks (quote,") is semantically inaccurate in that it implies the punctuation is part of the original quoted text. With typewriter legacy cast aside, the remaining aesthetic issues can simply be handled with kerning and even with a CSS property directing the visual presentation to kern the quotation and punctuation closer together.

Various international presentational idioms CSS should address

While CSS can adequately distinguish quotations in ways familiar to users, there are some presentational idioms common in some locales that CSS should likely address eventually (see for example Wikipedia’s ‘Quotation mark, non-English usage‘ and Benjamin Hawkes-Lewis’ “CSS and quotation typography”).

These include:

  1. the above mentioned kerning of trailing punctuation and trailing quotation marks.
  2. the collapse of repeated terminating quotation marks for nested quotations ending simultaneously (French and Russian convention)
  3. line marker quotations marks at the beginning of each line of the quotation (French convention)
  4. block presentation of lengthy — though non-block content — quotations
  5. the semantics and presentation of the quoters editorial adjustments
  6. the inclusion inline of the quotation’s attribution without interceding close and open quotation marks (French)

These presentational idioms could all be addressed by CSS3 or a future CSS specification. Even without these presentational capabilities added to CSS, the present state of CSS as of CSS2 (W3C recommendation May 1998), provides sufficient mechanisms to style quotations in a manner comprehensible to most users.

The last two items might also require we add some semantic facilities to HTML:

  1. the semantics and presentation of the quoters editorial adjustments
    • perhaps adding an element to support this or use the existing INS and DEL elements with an author keyword or some other indication that these elements are used as the author's adjustments to the quotation.
  2. the inclusion inline of the quotation’s attribution without interceding close and open quotation marks
    • an attribute with a value repeated on adjacent of type quotations could facilitate the presentation of these quotations through CSS that omits the interceding close-quote and open-quote (as in the following example).

“This is a great day for Montrealers,” the minister said. “These investments will permit economic growth.”

« C’est une belle journée pour les Montréalais, soutient le ministre. Ces investissements stimuleront la croissance économique. »

« C’est une belle journée pour les Montréalais, soutient le ministre. Ces investissements stimuleront la croissance économique. »

Examples

Discussion and evaluation

Applicable Design Principles (proposed)

(see: Design Principles (proposed))

  • Support existing content: This attribute leaves the defaults as authors anticipate. The only concern would be if IE instituted HTML5 conformance before authors targeting only IE could change their content to conform.
  • Degrade gracefully: Degrades gracefully in that it provides authors better flexibility in dealing with existing UA discrepancies. Authors may decide to create content with “a quotation” now, adjust their author stylesheet and be completely ready for HTML5 conforming UAs.
  • Don't reinvent the wheel: The proposal uses the existing Q element that parses properly in existing UAs. The additional @marks attribute will also parse properly. The only change needed is a CSS style declaration from either the author stylesheet or an HTML5 conforming UA default style sheet.
  • Pave the cowpaths: Authors and IE developers have already expressed an interest in including quotation marks within semantic markup. However there has been no specified way to handle the different authoring styles.
  • Evolution not revolution: Simply adds a single DOM and markup attribute to two existing elements.
  • Solve real problems: The issue of these disparate authoring styles has plagued the Q element since its inception.
  • Priority of constituencies: This deals with problems facing authors and users in an implementation friendly way. IE still needs to support CSS ::before and ::after selectors and the CSS 'content' property (or a non-CSS equivalent) to fully implement this feature. However, every other UA can support this with simple changes to their UA default style sheet.
  • Media independence: Promotes the use of quotation elements that can be presented and used across any media.
  • Universal access: Facilitates access by aural browser users among others.
  • Support World languages: Provides support for languages where quotations marks are not added or removed in different contexts and are therefore not styling at all.
  • Separation of concerns: Provides better separation between semantic markup of quotations and styling. Authors can choose how to use quotation marks based on their own quotation mark usage.
  • Well-Defined Behavior: Improves the reliability of using quotation marks in existing browsers.
  • Avoid Needless Complexity: Quite a simple solution.

Email

WG members should post feedback and other discussion to the WG’s list serve (the URI for the links below provides date information). Search on this email subject.

Originally introduced in a review of the HTML5 draft section on phrase elements.

  1. July 2007 (Review by Rob Burns)

Discussion of alternate proposal on wai-xtech list serve with the subject: "Alternate Additional Attribute Set for a Single Quote Element"

Threads

See also