SVG Accessibility/Testing/Test Assertions/Language Tables

From W3C Wiki

Tests with Language Dependencies

The tests on this page have language dependencies, that is the expected answer may change with the language settings of the user agent and OS. The set of tests below generally are only testing the effects of having multiple title and desc elements with a lang attribute.

As of March 30, 2016 19 lang dependent tests are captured.

English
  • 5 tests for name
  • 6 tests for description
non English (via inheritance)
  • 8 tests for name
  • 3 tests for description

Latest zip file of tests File:TestLang.zip

Test setup

A typical test will have multiple title or desc elements and will have the correct lang somewhere in the middle of a list. However, it is desirable to test every position in a list and test different length lists, so you may find a test with the correct lang at the beginning or end of a list. It is impractical to test every possible list length and most tests only have three or four languages in the list.

Test cases not covered

When a test result should not be influenced by a title or desc, the tests are not included. Those tests are only covered in the main test assertions wiki page.

English

The user agent should have their language set to English for these tests. The language may be inherited from the OS.

Testable statements for name calculation (English)

Simple name multiple title testable statements

// title only

if given <circle id="test" cx='10' cy='100' r='5' ><title lang="es">hola</title><title lang="en">hi</title><title lang="de">Hallo</title></circle> and aria-labelledby and aria-label is not specified then accessible name = "hi"

MSAA accName hi
UIA Name hi
ATK name hi
AXAPI AXDescription hi
note
// title only, first

if given <circle id="test" cx='10' cy='100' r='5' ><title lang="en">hi</title><title lang="es">hola</title><title lang="de">Hallo</title></circle> and aria-labelledby and aria-label is not specified then accessible name = "hi"

MSAA accName hi
UIA Name hi
ATK name hi
AXAPI AXDescription hi
note
// title only, last

if given <circle id="test" cx='10' cy='100' r='5' ><title lang="es">hola</title><title lang="de">Hallo</title><title lang="en">hi</title></circle> and aria-labelledby and aria-label is not specified then accessible name = "hi"

MSAA accName hi
UIA Name hi
ATK name hi
AXAPI AXDescription hi
note

Empty aria-labelledby multiple title testable statements

// empty aria-labelledby, title

if given <circle id="test" aria-labelledby="" cx='50' cy='100' r='15'><title lang="es">hola</title><title lang="fr">bonjour</title><title lang="en">waz up</title><title lang="de">Hallo</title></circle> then accessible name = "waz up"

MSAA accName waz up
IA2_RELATION_LABELLED_BY <not empty>
UIA Name waz up
LabeledBy <not empty>
ATK name waz up
RELATION_LABELLED_BY <not empty>
AXAPI AXDescription waz up
note

a element multiple title testable statements

// multiple title and xlink title

if given <a id="test" href="../index.html" xlink:title="table" ><title lang="es">barra</title><title lang="en">counter</title><title lang="fr">guichet</title></a> and aria-labelledby is not specified then accessible name = "counter"

MSAA accName counter
UIA Name counter
ATK name counter
AXAPI AXDescription counter
note

use element multiple title testable statements

// use multiple title on reference xlink href

if given <defs><path id="r1" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z"><title lang="es">piedra</title><title lang="en">stone</title><title lang="de">Stein</title></path></defs> <use id="test" transform="translate(30 345)" xlink:href="#r1"/> and aria-labelledby is not specified then accessible name = "stone"

MSAA accName stone
UIA Name stone
ATK name stone
AXAPI AXTitle stone
note
// use multiple title on reference href

if given <defs><path id="r1" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z"><title lang="en">stone</title><title lang="es">piedra</title><title lang="de">Stein</title></path></defs><use id="test" transform="translate(30 345)" href="#r1"/> and aria-labelledby is not specified then accessible name = "stone"

MSAA accName stone
UIA Name stone
ATK name stone
AXAPI AXTitle stone
note

Testable statements for description calculation (English)

Simple description testable statements

// aria-describedby, multiple desc, title

if given <circle id="test" aria-describedby="t1" cx='50' cy='100' r='15'><title>abc</title><desc lang="en">123</desc><desc lang="es">456</desc></circle><text id="t1" x="40" y="90">end</text> then accessible description = "end"

MSAA accDescription end
IA2_RELATION_DESCRIBED_BY <not empty>
UIA TBD end
DescribedBy <not empty>
ATK description end
AXAPI AXHelp end
note
// multiple desc, multiple title

if given <circle id="test" cx='50' cy='100' r='15'><title lang="en">abc</title><title lang="de">def</title><desc lang='fr'>123</desc><desc lang='en'>554</desc><desc lang='es'>432</desc></circle> then accessible description = "554"

MSAA accDescription 554
UIA TBD 554
ATK description 554
AXAPI AXHelp 554
note
// multiple desc only

if given <circle id="test" cx='50' cy='100' r='15'><desc lang='es'>432</desc><desc lang='fr'>123</desc><desc lang='en'>567</desc></circle> then accessible description = "567"

MSAA accDescription 567
UIA TBD 567
ATK description 567
AXAPI AXHelp 567
note

Empty aria-describedby testable statements

// empty aria-describedby, multiple desc, title

if given <circle id="test" aria-describedby="" cx='50' cy='100' r='15'><title>abc</title><desc lang='fr'>123</desc><desc lang='en'>222</desc><desc lang='es'>432</desc></circle> then accessible description = "222"

MSAA accDescription 222
IA2_RELATION_DESCRIBED_BY <not empty>
UIA TBD 222
DescribedBy <not empty>
ATK description 222
AXAPI AXHelp 222
note
// empty aria-describedby, multiple desc

if given <circle id="test" aria-describedby="" cx='50' cy='100' r='15'><desc lang='fr'>123</desc><desc lang='es'>444</desc><desc lang='en'>911</desc></circle> then accessible description = "911"

MSAA accDescription 911
IA2_RELATION_DESCRIBED_BY <not empty>
UIA TBD 911
DescribedBy <not empty>
ATK description 911
AXAPI AXHelp 911
note

Title is description

// description aria-labelledby, multiple title

if given <circle id="test" aria-labelledby="t1" cx='50' cy='100' r='15'><title lang="es">barra</title><title lang="en">counter</title><title lang="fr">guichet</title></circle><text id="t1" x="40" y="90">end</text> then accessible description = "counter"

MSAA accDescription counter
UIA TBD counter
ATK description counter
AXAPI AXHelp counter
note
// description aria-label, multiple title

if given <circle id="test" aria-label="bob" cx='50' cy='100' r='15'><title lang="fr">guichet</title><title lang="es">barra</title><title lang="en">counter</title></circle> then accessible description = "counter"

MSAA accDescription counter
UIA TBD counter
ATK description counter
AXAPI AXHelp counter
note

Title is same as accessible name

// aria-labelledby, multiple title

if given <circle id="test" aria-labelledby="t1" cx='50' cy='100' r='15'><title lang="es">soy</title><title lang="en">abc</title><title lang="fr">le</title></circle><text id="t1" x="40" y="90">abc</text> then accessible description = BLANK

MSAA accDescription <empty>
UIA TBD <empty>
ATK description <empty>
AXAPI AXHelp <empty>
note
// aria-label, multiple title

if given <circle id="test" aria-label="bob" cx='50' cy='100' r='15'><title lang='en'>bob</title><title lang="fr">dan</title><title lang="es">juan</title></circle> then accessible description = BLANK

MSAA accDescription <empty>
UIA TBD <empty>
ATK description <empty>
AXAPI AXHelp <empty>
note
// aria-label, multiple title different order

if given <circle id="test" aria-label="bob" cx='50' cy='100' r='15'><title lang="fr">dan</title><title lang="es">juan</title><title lang='en'>bob</title></circle> then accessible description = BLANK

MSAA accDescription <empty>
UIA TBD <empty>
ATK description <empty>
AXAPI AXHelp <empty>
note

Non English via inheritance

The user agent should have their language set to English for these tests. The language may be inherited from the OS. The non English expected result will be because of a parent element setting the lang to a non en value.

Testable statements for name calculation

Simple name multiple title testable statements (Spanish)

// title only, lang in parent g that is NOAC

if given <g lang="es"><circle id="test" cx='10' cy='100' r='5' ><title lang="es">hola</title><title lang="en">hi</title><title lang="de">Hallo</title></circle></g> and aria-labelledby and aria-label is not specified then accessible name = "hola"

MSAA accName hola
UIA Name hola
ATK name hola
AXAPI AXDescription hola
note
// title only, lang in parent g

if given <g lang="es" aria-label="123" ><circle id="test" cx='10' cy='100' r='5' ><title lang="en">hi</title><title lang="es">hola</title><title lang="de">Hallo</title></circle></g> and aria-labelledby and aria-label is not specified then accessible name = "hola"

MSAA accName hola
UIA Name hola
ATK name hola
AXAPI AXDescription hola
note
// title only, first, lang in parent g

if given <g lang="es" aria-label="123" ><circle id="test" cx='10' cy='100' r='5' ><title lang="es">hola</title><title lang="de">Hallo</title><title lang="en">hi</title></circle></g> and aria-labelledby and aria-label is not specified then accessible name = "hola"

MSAA accName hola
UIA Name hola
ATK name hola
AXAPI AXDescription hola
note
// title only, lang in parent g that is NOAC

if given <g lang="es"><circle id="test" cx='10' cy='100' r='5' ><title lang="en">hi</title><title lang="de">Hallo</title><title lang="">hola</title></circle></g> and aria-labelledby and aria-label is not specified then accessible name = "hola"

MSAA accName hola
UIA Name hola
ATK name hola
AXAPI AXDescription hola
note

aria-labelledby, target different language (German)

Empty aria-labelledby multiple title testable statements (German)

// empty aria-labelledby, title

if given <g lang="de" aria-label="123" ><circle id="test" aria-labelledby="" cx='50' cy='100' r='15'><title lang="es">hola</title><title lang="fr">bonjour</title><title lang="en">waz up</title><title lang="de">Hallo</title></circle></g> then accessible name = "Hallo"

MSAA accName Hallo
IA2_RELATION_LABELLED_BY <not empty>
UIA Name Hallo
LabeledBy <not empty>
ATK name Hallo
RELATION_LABELLED_BY <not empty>
AXAPI AXDescription Hallo
note

use element multiple title testable statements (Spanish)

// use multiple title on reference xlink href, lang in ref element

if given <defs><path id="r1" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z" lang='es'><title lang="es">piedra</title><title lang="en">stone</title><title lang="de">Stein</title></path></defs> <use id="test" transform="translate(30 345)" xlink:href="#r1"/> and aria-labelledby is not specified then accessible name = "piedra"

MSAA accName piedra
UIA Name piedra
ATK name piedra
AXAPI AXTitle piedra
note
// use multiple title on reference href, lang in def

if given <defs lang='es'><path id="r1" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z"><title lang="en">stone</title><title lang="es">piedra</title><title lang="de">Stein</title></path></defs><use id="test" transform="translate(30 345)" href="#r1"/> and aria-labelledby is not specified then accessible name = "piedra"

MSAA accName piedra
UIA Name piedra
ATK name piedra
AXAPI AXTitle piedra
note
// use multiple title on reference xlink href, lang on parent of use

if given <defs><path id="r1" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z"><title lang="es">piedra</title><title lang="en">stone</title><title lang="de">Stein</title></path></defs><g lang='es'> <use id="test" transform="translate(30 345)" xlink:href="#r1"/></g> and aria-labelledby is not specified then accessible name = "stone"

MSAA accName stone
UIA Name stone
ATK name stone
AXAPI AXTitle stone
note
// use multiple title on reference href, lang on use (English)

if given <defs><path id="r1" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z"><title lang="en">stone</title><title lang="es">piedra</title><title lang="de">Stein</title></path></defs><g lang='es'><use id="test" transform="translate(30 345)" href="#r1" lang='es' /></g> and aria-labelledby is not specified then accessible name = "stone"

MSAA accName stone
UIA Name stone
ATK name stone
AXAPI AXTitle stone
note

Testable statements for description calculation non English via inheritance

Simple description testable statements (French)

// multiple desc, multiple title

if given <g lang='fr'><circle id="test" cx='50' cy='100' r='15'><title lang="en">abc</title><title lang="de">def</title><desc lang='fr'>123</desc><desc lang='en'>554</desc><desc lang='es'>432</desc></circle></g> then accessible description = "123"

MSAA accDescription 123
UIA TBD 123
ATK description 123
AXAPI AXHelp 123
note
// multiple desc only

if given <g lang='fr'><circle id="test" cx='50' cy='100' r='15'><desc lang='es'>432</desc><desc lang='fr'>123</desc><desc lang='en'>567</desc></circle></g> then accessible description = "123"

MSAA accDescription 123
UIA TBD 123
ATK description 123
AXAPI AXHelp 123
note

Empty aria-describedby testable statements (French)

// empty aria-describedby, multiple desc, title

if given <g lang='fr'><circle id="test" aria-describedby="" cx='50' cy='100' r='15'><title>abc</title><desc lang='fr'>123</desc><desc lang='en'>222</desc><desc lang='es'>432</desc></circle></g> then accessible description = "123"

MSAA accDescription 123
IA2_RELATION_DESCRIBED_BY <not empty>
UIA TBD 123
DescribedBy <not empty>
ATK description 123
AXAPI AXHelp 123
note
// empty aria-describedby, multiple desc

if given <g lang='fr'><circle id="test" aria-describedby="" cx='50' cy='100' r='15'><desc lang='fr'>123</desc><desc lang='es'>444</desc><desc lang='en'>911</desc></circle></g> then accessible description = "123"

MSAA accDescription 123
IA2_RELATION_DESCRIBED_BY <not empty>
UIA TBD 123
DescribedBy <not empty>
ATK description 123
AXAPI AXHelp 123
note

Title is description (Spanish)

// description aria-labelledby, multiple title

if given <circle id="test" aria-labelledby="t1" cx='50' cy='100' r='15' lang='es'><title lang="es">barra</title><title lang="en">counter</title><title lang="fr">guichet</title></circle><text id="t1" x="40" y="90">end</text> then accessible description = "barra"

MSAA accDescription barra
UIA TBD barra
ATK description barra
AXAPI AXHelp barra
note
// description aria-label, multiple title

if given <g lang="es" aria-label="hola"><circle id="test" aria-label="bob" cx='50' cy='100' r='15'><title lang="fr">guichet</title><title lang="es">barra</title><title lang="en">counter</title></circle></g> then accessible description = "barra"

MSAA accDescription barra
UIA TBD barra
ATK description barra
AXAPI AXHelp barra
note