W3C home > Mailing lists > Public > public-pronunciation@w3.org > September 2022

[DRAFT] ARIA Counter Proposal

From: Paul Grenier <pgrenier@gmail.com>
Date: Tue, 13 Sep 2022 08:09:26 -0700
Message-ID: <CAMq9vGYjC8hCshaotrwYw6u1TTRgxeoCCpjpLbB0Z97FHUw-vQ@mail.gmail.com>
To: Pronunciation Task Force <public-pronunciation@w3.org>
Expansion of ARIA Pronunciation Proposal

ref:
https://docs.google.com/document/d/1GzVgbwcldWAP3l6yc3KLSRy4rr_qRusEE566viui0_o/edit#

The Pronunciation Task Force (TF) has evaluated multiple approaches to
pronunciation and summarized their analysis in the Gap Analysis
<https://w3c.github.io/pronunciation/gap-analysis_and_use-case/#gap-analysis>.
The ARIA proposal
<https://docs.google.com/document/d/1GzVgbwcldWAP3l6yc3KLSRy4rr_qRusEE566viui0_o/edit#>,
through an aria-pronouce attribute, provides an improved technique for
authors to correct pronunciation and substitution.

However, we believe with slight modifications, the ARIA proposal could also
achieve similar results for additional, priorty features. The priority
features identified by the Pronunciation TF are:

   - Language (covered by HTML and RFC 5646
   <https://datatracker.ietf.org/doc/html/rfc5646> with possible
   modifications for historical variants, dialects, etc.)
   - Phonetic Pronunciation (covered by the core of the ARIA proposal)
   - Substitution
   - Say As
   - Pausing (Break)

<https://github.com/w3c/pronunciation/wiki/%5BDRAFT%5D-ARIA-Counter-Proposal#substitution>
Substitution

For substitution, the alias key could indicate an expansion.

<script>document.pronunciationDict = {
  "en-US": {
    "W3C": {
      "alias": "World Wide Web Consortium"
    }
  }};</script><span aria-pronounce="alias">W3C</span>

<https://github.com/w3c/pronunciation/wiki/%5BDRAFT%5D-ARIA-Counter-Proposal#say-as>
Say-as

For say-as, the interpret-as value can be used to key different
pronunciations. This does not address parsing of various formats, such as
date or currency.

<script>document.pronunciationDict = {
  "en-US": {
    "10": {
      "characters": "1 0",
      "ordinal": "tenth",
      "cardinal": "ten"
    },
    "λ": {
      "symbol": "lambda"
    },
    "Ω": {
      "symbol": /oʊˈmeɪɡə/
    }
  }};</script><span aria-pronounce="characters">10</span><span
aria-pronounce="ordinal">10</span><span
aria-pronounce="cardinal">10</span><span
aria-pronounce="symbol">λ</span><span aria-pronounce="symbol">Ω</span>

<https://github.com/w3c/pronunciation/wiki/%5BDRAFT%5D-ARIA-Counter-Proposal#pausing>
Pausing

For pausing, common punctuation or other characters could map to pauses but
this would require a different notation from the phonetic and ipa notations
used in the other examples.

<script>document.pronunciationDict = {
  "en-US": {
    "...": {
      "break": "[250ms]"
    }
  }};</script>
We will put it by, that when he comes again<span
aria-pronounce="break">...</span> But it may be months, perhaps,
before THAT happens.

It's unclear, from the ARIA proposal, if , was keyed into the dictionary
and the entire example was wrapped with <div aria-pronounce="break"> whether
or not the individual commas would get parsed. For now, it's assumed that
each comma would need to be separately wrapped to ensure the proper timing.
<https://github.com/w3c/pronunciation/wiki/%5BDRAFT%5D-ARIA-Counter-Proposal#emphasiswhisper>
Emphasis/Whisper

In the previous example (Jane Austen’s Sense and Sensibility), "THAT"
should be read with emphasis. However, not only would creating such a
key/value pair require a new notation for emphasis (e.g., {{THAT}}), any
emphasized text would need to be added to the dictionary even if no
pronunciation hint is needed. A SENTENCE WITH EVERY WORD HIGHLIGHTED (to
quote a recent commercial), would require significant markup and thus, this
probably isn't the proper technique.

If there were a substitution notation, like for RegExp, perhaps there could
still be a solution using this proposal. It might look like this: $emphasize':
'{{$}}' where any text wrapped with <span aria-pronounce="$emphasize"> leaves
the content unaltered. Like other voice changes (gender, age, emotion),
this notation could be independant from locale and/or apply to multiple
locales.

<script>document.pronunciationDict = {
  "$": {
    "$emphasize": "{{$}}",
    "$whisper": "}}${{"
  }
  "en-US": {
    "...": {
      "break": "[250ms]"
    }
  }};</script>
We will put it by, that when he comes again<span
aria-pronounce="break">...</span> But it may be months, perhaps,
before <span aria-pronounce="$emphasize">THAT</span> happens.
Received on Tuesday, 13 September 2022 15:09:52 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 13 September 2022 15:09:53 UTC