From 7471d4968b7401ca9c41dbee2ac26c47334cb14b Mon Sep 17 00:00:00 2001 From: Joanmarie Diggs Date: Fri, 17 Aug 2018 08:14:00 +0300 Subject: [PATCH] Bug 1484248 - Accessible name calculation from label content should include cells. r=surkov Change the name calculation rule of HTML 'table' element from eNoNameRule to eNameFromSubtreeIfReqRule. That way the table won't get an accessible name, but will be descended when building a name from a parent element's contents. --HG-- extra : rebase_source : 218aec9f90b0c420a5f6785e929e5512b6704567 --- accessible/base/RoleMap.h | 2 +- .../mochitest/name/test_ARIACore_examples.html | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/accessible/base/RoleMap.h b/accessible/base/RoleMap.h index 42102d7d942a..d283e07d0385 100644 --- a/accessible/base/RoleMap.h +++ b/accessible/base/RoleMap.h @@ -239,7 +239,7 @@ ROLE(TABLE, ROLE_SYSTEM_TABLE, ROLE_SYSTEM_TABLE, "android.widget.GridView", - eNoNameRule) + eNameFromSubtreeIfReqRule) ROLE(COLUMNHEADER, "columnheader", diff --git a/accessible/tests/mochitest/name/test_ARIACore_examples.html b/accessible/tests/mochitest/name/test_ARIACore_examples.html index 24b81ea451d4..c4522ce0131d 100644 --- a/accessible/tests/mochitest/name/test_ARIACore_examples.html +++ b/accessible/tests/mochitest/name/test_ARIACore_examples.html @@ -37,6 +37,11 @@ // more own inner text, separated by 1 space. testName("chkbx", "Flash the screen 5 times"); + // Example 4 from section 4.3.1 under 2.F. + // Name from content should include all the child nodes, including + // table cells. + testName("input_with_html_label", "foo bar baz"); + SimpleTest.finish(); } @@ -73,5 +78,14 @@ + + + + +