Bug 526915 - aria-describedby broken in FF 3.6b1, r=marcoz, davidb
authorAlexander Surkov <surkov.alexander@gmail.com>
Sat, 07 Nov 2009 14:37:51 +0800
changeset 34658 b697b641e508c6116301583266cd0e60f657989a
parent 34657 51417c7ae974e3a2c3a9c0c4ba3b05556ff57200
child 34659 e91b5f834338011bdc98bd33cda217c243096719
push id10158
push usersurkov.alexander@gmail.com
push dateSat, 07 Nov 2009 06:38:20 +0000
treeherdermozilla-central@b697b641e508 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarcoz, davidb
bugs526915
milestone1.9.3a1pre
Bug 526915 - aria-describedby broken in FF 3.6b1, r=marcoz, davidb
accessible/src/base/nsTextEquivUtils.cpp
accessible/tests/mochitest/test_descr.html
--- a/accessible/src/base/nsTextEquivUtils.cpp
+++ b/accessible/src/base/nsTextEquivUtils.cpp
@@ -558,17 +558,17 @@ PRUint32 nsTextEquivUtils::gRoleToNameRu
   eNoRule,           // ROLE_FOOTER
   eFromSubtreeIfRec, // ROLE_PARAGRAPH
   eNoRule,           // ROLE_RULER
   eNoRule,           // ROLE_AUTOCOMPLETE
   eNoRule,           // ROLE_EDITBAR
   eFromValue,        // ROLE_ENTRY
   eNoRule,           // ROLE_CAPTION
   eNoRule,           // ROLE_DOCUMENT_FRAME
-  eNoRule,           // ROLE_HEADING
+  eFromSubtreeIfRec, // ROLE_HEADING
   eNoRule,           // ROLE_PAGE
   eFromSubtreeIfRec, // ROLE_SECTION
   eNoRule,           // ROLE_REDUNDANT_OBJECT
   eNoRule,           // ROLE_FORM
   eNoRule,           // ROLE_IME
   eNoRule,           // ROLE_APP_ROOT
   eFromSubtree,      // ROLE_PARENT_MENUITEM
   eNoRule,           // ROLE_CALENDAR
--- a/accessible/tests/mochitest/test_descr.html
+++ b/accessible/tests/mochitest/test_descr.html
@@ -30,16 +30,19 @@
       // No description from @title attribute because it is used to generate
       // name.
       testDescr("img2", "");
 
       // Description from @title attribute, name is generated from @alt
       // attribute.
       testDescr("img3", "description");
 
+      // Description from content of h2.
+      testDescr("p", "heading");
+
       SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 
 </head>
@@ -56,10 +59,12 @@
   <pre id="test">
   </pre>
 
   <p id="description">aria description</p>
   <img id="img1" aria-describedby="description" />
   <img id="img2" title="title" />
   <img id="img3" alt="name" title="description" />
 
+  <h2 id="heading">heading</h2>
+  <p id="p" aria-describedby="heading" role="button">click me</p>
 </body>
 </html>