diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-06 08:51:11 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-06 08:51:11 +0000 |
commit | a0afceb9561005694d89872be0f65508d2375f03 (patch) | |
tree | e27bd6ca10153898c75c60f11d964e0f936c5459 /content/test/data | |
parent | bed264830d568956f646d7dd55b0f139d9b66ee8 (diff) | |
download | chromium_src-a0afceb9561005694d89872be0f65508d2375f03.zip chromium_src-a0afceb9561005694d89872be0f65508d2375f03.tar.gz chromium_src-a0afceb9561005694d89872be0f65508d2375f03.tar.bz2 |
Improve accessible name calculation on Windows.
This depends on: http://codereview.chromium.org/10662003/
Based on the HTML to Platform Accessibility APIs Implementation Guide
(http://www.w3.org/TR/html-aapi/), add some new tests to assert the
correct behavior for computing the text alternative for a
checkbox, button, and text field, then fix the implementation to
match the test.
BUG=124314
TBR=dtseng
Review URL: https://chromiumcodereview.appspot.com/10823073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150070 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test/data')
9 files changed, 109 insertions, 0 deletions
diff --git a/content/test/data/accessibility/button-name-calc-expected-mac.txt b/content/test/data/accessibility/button-name-calc-expected-mac.txt new file mode 100644 index 0000000..e929435 --- /dev/null +++ b/content/test/data/accessibility/button-name-calc-expected-mac.txt @@ -0,0 +1 @@ +#<skip -- need to validate/generate> diff --git a/content/test/data/accessibility/button-name-calc-expected-win.txt b/content/test/data/accessibility/button-name-calc-expected-win.txt new file mode 100644 index 0000000..4459150 --- /dev/null +++ b/content/test/data/accessibility/button-name-calc-expected-win.txt @@ -0,0 +1,8 @@ +ROLE_SYSTEM_DOCUMENT name='' READONLY FOCUSABLE description='' + IA2_ROLE_SECTION name='' READONLY description='' + ROLE_SYSTEM_PUSHBUTTON name='InnerText0' FOCUSABLE description='' + ROLE_SYSTEM_PUSHBUTTON name='InnerText1' FOCUSABLE description='Title1' + ROLE_SYSTEM_PUSHBUTTON name='AriaLabel2' FOCUSABLE description='Title2' + ROLE_SYSTEM_PUSHBUTTON name='LabelledBy3' FOCUSABLE description='Title3' + ROLE_SYSTEM_PUSHBUTTON name='LabelledBy4' FOCUSABLE description='DescribedBy4' + ROLE_SYSTEM_PUSHBUTTON name='InnerText5' FOCUSABLE description='DescribedBy5' diff --git a/content/test/data/accessibility/button-name-calc.html b/content/test/data/accessibility/button-name-calc.html new file mode 100644 index 0000000..f7a7c74c --- /dev/null +++ b/content/test/data/accessibility/button-name-calc.html @@ -0,0 +1,22 @@ +<!-- +@WIN-ALLOW:description* +--> +<html> +<body> + <button id="c0">InnerText0</button> + <button id="c1" title="Title1">InnerText1</button> + <button id="c2" title="Title2" aria-label="AriaLabel2">InnerText2</button> + <button id="c3" title="Title3" aria-label="AriaLabel3" + aria-labelledby="lb3">InnerText3</button> + <button id="c4" title="Title4" aria-label="AriaLabel4" + aria-labelledby="lb4" aria-describedby="db4">InnerText4</button> + <button id="c5" aria-describedby="db5">InnerText5</button> + + <p aria-label="@NO_DUMP"> + <span id="lb3">LabelledBy3</span> + <span id="lb4">LabelledBy4</span> + <span id="db4">DescribedBy4</span> + <span id="db5">DescribedBy5</span> + </p> +</body> +</html> diff --git a/content/test/data/accessibility/checkbox-name-calc-expected-mac.txt b/content/test/data/accessibility/checkbox-name-calc-expected-mac.txt new file mode 100644 index 0000000..e929435 --- /dev/null +++ b/content/test/data/accessibility/checkbox-name-calc-expected-mac.txt @@ -0,0 +1 @@ +#<skip -- need to validate/generate> diff --git a/content/test/data/accessibility/checkbox-name-calc-expected-win.txt b/content/test/data/accessibility/checkbox-name-calc-expected-win.txt new file mode 100644 index 0000000..0e31ace --- /dev/null +++ b/content/test/data/accessibility/checkbox-name-calc-expected-win.txt @@ -0,0 +1,8 @@ +ROLE_SYSTEM_DOCUMENT name='' READONLY FOCUSABLE description='' + IA2_ROLE_SECTION name='' READONLY description='' + ROLE_SYSTEM_CHECKBUTTON name='Title0' FOCUSABLE description='' + ROLE_SYSTEM_CHECKBUTTON name='Label1' FOCUSABLE description='Title1' + ROLE_SYSTEM_CHECKBUTTON name='AriaLabel2' FOCUSABLE description='Title2' + ROLE_SYSTEM_CHECKBUTTON name='LabelledBy3' FOCUSABLE description='Title3' + ROLE_SYSTEM_CHECKBUTTON name='LabelledBy4' FOCUSABLE description='DescribedBy4' + ROLE_SYSTEM_CHECKBUTTON name='DescribedBy5' FOCUSABLE description='' diff --git a/content/test/data/accessibility/checkbox-name-calc.html b/content/test/data/accessibility/checkbox-name-calc.html new file mode 100644 index 0000000..54436dd --- /dev/null +++ b/content/test/data/accessibility/checkbox-name-calc.html @@ -0,0 +1,26 @@ +<!-- +@WIN-ALLOW:description* +--> +<html> +<body> + <input id="c0" type="checkbox" title="Title0"> + <input id="c1" type="checkbox" title="Title1"> + <input id="c2" type="checkbox" title="Title2" aria-label="AriaLabel2"> + <input id="c3" type="checkbox" title="Title3" aria-label="AriaLabel3" + aria-labelledby="lb3"> + <input id="c4" type="checkbox" title="Title4" aria-label="AriaLabel4" + aria-labelledby="lb4" aria-describedby="db4"> + <input id="c5" type="checkbox" aria-describedby="db5"> + + <p aria-label="@NO_DUMP"> + <label for="c1">Label1</label> + <label for="c2">Label2</label> + <label for="c3">Label3</label> + <label for="c4">Label4</label> + <span id="lb3">LabelledBy3</span> + <span id="lb4">LabelledBy4</span> + <span id="db4">DescribedBy4</span> + <span id="db5">DescribedBy5</span> + </p> +</body> +</html> diff --git a/content/test/data/accessibility/input-text-name-calc-expected-mac.txt b/content/test/data/accessibility/input-text-name-calc-expected-mac.txt new file mode 100644 index 0000000..e929435 --- /dev/null +++ b/content/test/data/accessibility/input-text-name-calc-expected-mac.txt @@ -0,0 +1 @@ +#<skip -- need to validate/generate> diff --git a/content/test/data/accessibility/input-text-name-calc-expected-win.txt b/content/test/data/accessibility/input-text-name-calc-expected-win.txt new file mode 100644 index 0000000..929910a --- /dev/null +++ b/content/test/data/accessibility/input-text-name-calc-expected-win.txt @@ -0,0 +1,9 @@ +ROLE_SYSTEM_DOCUMENT name='' READONLY FOCUSABLE description='' + IA2_ROLE_SECTION name='' READONLY description='' + ROLE_SYSTEM_TEXT name='Title0' FOCUSABLE description='' + ROLE_SYSTEM_TEXT name='Label1' FOCUSABLE description='Title1' + ROLE_SYSTEM_TEXT name='AriaLabel2' FOCUSABLE description='Title2' + ROLE_SYSTEM_TEXT name='LabelledBy3' FOCUSABLE description='Title3' + ROLE_SYSTEM_TEXT name='Placeholder4' FOCUSABLE description='' + ROLE_SYSTEM_TEXT name='Title5' FOCUSABLE description='Placeholder5' + ROLE_SYSTEM_TEXT name='LabelledBy6' FOCUSABLE description='DescribedBy6' diff --git a/content/test/data/accessibility/input-text-name-calc.html b/content/test/data/accessibility/input-text-name-calc.html new file mode 100644 index 0000000..5843b8c --- /dev/null +++ b/content/test/data/accessibility/input-text-name-calc.html @@ -0,0 +1,33 @@ +<!-- +@WIN-ALLOW:description* +--> +<html> +<body> + <input id="c0" type="text" title="Title0"> + <input id="c1" type="text" title="Title1"> + <input id="c2" type="text" title="Title2" aria-label="AriaLabel2"> + <input id="c3" type="text" title="Title3" aria-label="AriaLabel3" + aria-labelledby="lb3"> + + <input id="c4" type="text" placeholder="Placeholder4"> + <input id="c5" type="text" placeholder="Placeholder5" title="Title5"> + + <input id="c6" type="text" title="Title6" + aria-label="AriaLabel6" aria-labelledby="lb6" + aria-describedby="db6"> + + <p aria-label="@NO_DUMP"> + <label for="c1">Label1</label> + <label for="c2">Label2</label> + <label for="c3">Label3</label> + + <label for="c6">Label6</label> + + <span id="lb3">LabelledBy3</span> + + <span id="lb6">LabelledBy6</span> + + <span id="db6">DescribedBy6</span> + </p> +</body> +</html> |