W3C home > Mailing lists > Public > public-svg-a11y@w3.org > June 2016

Re: trimming whitespace in name and description calculation

From: Fred Esch <fesch@us.ibm.com>
Date: Mon, 13 Jun 2016 12:14:57 -0400
To: Joseph Scheuhammer <clown@alum.mit.edu>
Cc: jdiggs <jdiggs@igalia.com>, public-svg-a11y@w3.org
Message-Id: <OF29A2121E.9C760F79-ON85257FD1.0058BF02-85257FD1.005942A2@notes.na.collabserv.com>

Hi Joseph,

Thank you for the explanation it is very helpful. Does a string only
consisting of whitespace trim down to the empty string (length 0) or a
string with a single whitespace (length 1)? My memory isn't great, but I
think in SVG we may have rules that are affected by title and desc elements
that trim down to empty strings.

    Fred Esch                                                 
 Watson, IBM, W3C                                             
 IBM Watson       Watson Release Management and Quality       

From:	Joseph Scheuhammer <clown@alum.mit.edu>
To:	Fred Esch/Arlington/IBM@IBMUS
Cc:	jdiggs <jdiggs@igalia.com>, public-svg-a11y@w3.org
Date:	06/10/2016 04:25 PM
Subject:	Re: trimming whitespace in name and description calculation

Hi Fred,

> Is trimming whitespace described elsewhere?

The accname-aam uses the phrase "flat text string" in many places to
describe both intermediate and final results.  The term itself is
defined in the "Terminology" section [1], repeated here:

"Flat string:  A string of characters where all carriage returns,
newlines, tabs, and form-feeds are replaced with a single space, and
multiple spaces are reduced to a single space. The string contains only
character data; it does not contain any markup."

Section 5 begins, "Each step of the algorithm generates a flat text
string".  Each step itself says (paraphrase) that the result of that
step is appended with a space to the current accumulated text (although
there is one case [step 2F.iii] with an editor's note about sometimes
appending without a space).  "Appending with/without a space" is also
defined in the Terminology section.

The logic is that each step produces a flat string, and that flat string
is appended to the current result, which is also a flat string.  Since a
flat string is defined as containing nothing but single spaces between
text tokens, all intermediate results and the final result are
effectively trimmed.

Hope that helps.

[1] https://w3c.github.io/aria/accname-aam/accname-aam.html#terminology

On 2016-06-10 11:53 AM, Fred Esch wrote:
> Hi Joseph,
> In January, Joanie noted that trimming whitespace was omitted from the
> name and description calculation. The only place I can find trimming
> white space mentioned is in the second sentence of Accessible Name and
> Description Mapping
> <
> /An implementation//trims//the text and concatenates it with the text
> alternative computed by previous steps. /
> Is trimming whitespace described elsewhere? In SVG, we have at least
> one rule that is dependent on whether a string is empty or not. In SVG
> Views
> <https://rawgit.com/w3c/aria/master/svg-aam/svg-aam.html#mapping_view>
> in the second bullet we have
> /If the result is a//non-empty string//, it //SHOULD//replace the
> corresponding name or description for the //svg//element while the
> view is in effect. /
> Even though this is a SHOULD I am wondering whether trimming strings
> is adequately defined.
> Regards,
> Fred Esch
> Watson, IBM, W3C Accessibility
> IBM Watson 		 Watson Release Management and Quality


'Die Wahrheit ist Irgendwo da Draußen. Wieder.'
                 - C. Carter -

(image/gif attachment: 11967407.gif)

(image/gif attachment: graycol.gif)

Received on Monday, 13 June 2016 16:26:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:28:20 UTC