diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /accessible/tests/mochitest/role | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'accessible/tests/mochitest/role')
-rw-r--r-- | accessible/tests/mochitest/role/a11y.ini | 10 | ||||
-rw-r--r-- | accessible/tests/mochitest/role/test_aria.html | 345 | ||||
-rw-r--r-- | accessible/tests/mochitest/role/test_aria.xul | 72 | ||||
-rw-r--r-- | accessible/tests/mochitest/role/test_general.html | 186 | ||||
-rw-r--r-- | accessible/tests/mochitest/role/test_general.xul | 57 | ||||
-rw-r--r-- | accessible/tests/mochitest/role/test_svg.html | 70 |
6 files changed, 740 insertions, 0 deletions
diff --git a/accessible/tests/mochitest/role/a11y.ini b/accessible/tests/mochitest/role/a11y.ini new file mode 100644 index 000000000..295fd34e4 --- /dev/null +++ b/accessible/tests/mochitest/role/a11y.ini @@ -0,0 +1,10 @@ +[DEFAULT] +support-files = + !/accessible/tests/mochitest/*.js + !/accessible/tests/mochitest/moz.png + +[test_aria.html] +[test_aria.xul] +[test_general.html] +[test_general.xul] +[test_svg.html] diff --git a/accessible/tests/mochitest/role/test_aria.html b/accessible/tests/mochitest/role/test_aria.html new file mode 100644 index 000000000..22021fa57 --- /dev/null +++ b/accessible/tests/mochitest/role/test_aria.html @@ -0,0 +1,345 @@ +<!DOCTYPE html> +<html> +<head> + <title>Test weak ARIA roles</title> + + <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" /> + + <script type="application/javascript" + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> + + <script type="application/javascript" + src="../common.js"></script> + <script type="application/javascript" + src="../role.js"></script> + + <script type="application/javascript"> + + function doTest() + { + // ARIA role map. + testRole("aria_alert", ROLE_ALERT); + testRole("aria_alertdialog", ROLE_DIALOG); + testRole("aria_application", ROLE_APPLICATION); + testRole("aria_article", ROLE_DOCUMENT); + testRole("aria_button", ROLE_PUSHBUTTON); + testRole("aria_checkbox", ROLE_CHECKBUTTON); + testRole("aria_columnheader", ROLE_COLUMNHEADER); + testRole("aria_combobox", ROLE_COMBOBOX); + testRole("aria_dialog", ROLE_DIALOG); + testRole("aria_directory", ROLE_LIST); + testRole("aria_document", ROLE_DOCUMENT); + testRole("aria_form", ROLE_FORM); + testRole("aria_feed", ROLE_GROUPING); + testRole("aria_grid", ROLE_TABLE); + testRole("aria_gridcell", ROLE_GRID_CELL); + testRole("aria_group", ROLE_GROUPING); + testRole("aria_heading", ROLE_HEADING); + testRole("aria_img", ROLE_GRAPHIC); + testRole("aria_link", ROLE_LINK); + testRole("aria_list", ROLE_LIST); + testRole("aria_listbox", ROLE_LISTBOX); + testRole("aria_listitem", ROLE_LISTITEM); + testRole("aria_log", ROLE_TEXT); // weak role + testRole("aria_marquee", ROLE_ANIMATION); + testRole("aria_math", ROLE_FLAT_EQUATION); + testRole("aria_menu", ROLE_MENUPOPUP); + testRole("aria_menubar", ROLE_MENUBAR); + testRole("aria_menuitem", ROLE_MENUITEM); + testRole("aria_menuitemcheckbox", ROLE_CHECK_MENU_ITEM); + testRole("aria_menuitemradio", ROLE_RADIO_MENU_ITEM); + testRole("aria_note", ROLE_NOTE); + testRole("aria_presentation", ROLE_TEXT); // weak role + testRole("aria_progressbar", ROLE_PROGRESSBAR); + testRole("aria_radio", ROLE_RADIOBUTTON); + testRole("aria_radiogroup", ROLE_RADIO_GROUP); + testRole("aria_region", ROLE_PANE); + testRole("aria_row", ROLE_ROW); + testRole("aria_rowheader", ROLE_ROWHEADER); + testRole("aria_scrollbar", ROLE_SCROLLBAR); + testRole("aria_searchbox", ROLE_ENTRY); + testRole("aria_separator", ROLE_SEPARATOR); + testRole("aria_slider", ROLE_SLIDER); + testRole("aria_spinbutton", ROLE_SPINBUTTON); + testRole("aria_status", ROLE_STATUSBAR); + testRole("aria_switch", ROLE_SWITCH); + testRole("aria_tab", ROLE_PAGETAB); + testRole("aria_tablist", ROLE_PAGETABLIST); + testRole("aria_tabpanel", ROLE_PROPERTYPAGE); + testRole("aria_textbox", ROLE_ENTRY); + testRole("aria_timer", ROLE_TEXT); // weak role + testRole("aria_toolbar", ROLE_TOOLBAR); + testRole("aria_tooltip", ROLE_TOOLTIP); + testRole("aria_tree", ROLE_OUTLINE); + testRole("aria_treegrid", ROLE_TREE_TABLE); + testRole("aria_treeitem", ROLE_OUTLINEITEM); + + // Note: + // The phrase "weak foo" here means that there is no good foo-to-platform + // role mapping. Similarly "strong foo" means there is a good foo-to- + // platform role mapping. + + testRole("articlemain", ROLE_DOCUMENT); + testRole("articleform", ROLE_FORM); + + // Test article exposed as document + testRole("testArticle", ROLE_DOCUMENT); + + // weak roles that are forms of "live regions" + testRole("log_table", ROLE_TABLE); + testRole("timer_div", ROLE_SECTION); + + // other roles that are forms of "live regions" + testRole("marquee_h1", ROLE_ANIMATION); + + // strong landmark + testRole("application", ROLE_APPLICATION); + testRole("form", ROLE_FORM); + testRole("application_table", ROLE_APPLICATION); + + // weak landmarks + var weak_landmarks = ["banner", "complementary", "contentinfo", + "main", "navigation", "search"]; + for (l in weak_landmarks) + testRole(weak_landmarks[l], ROLE_SECTION); + + for (l in weak_landmarks) { + var id = weak_landmarks[l] + "_table"; + testRole(id, ROLE_TABLE); + + var accessibleTable = getAccessible(id, [nsIAccessibleTable], null, + DONOTFAIL_IF_NO_INTERFACE); + ok(accessibleTable ? true : false, + "landmarked table should have nsIAccessibleTable"); + + if (accessibleTable) + is(accessibleTable.getCellAt(0,0).firstChild.name, "hi", "no cell"); + } + + ////////////////////////////////////////////////////////////////////////// + // test gEmptyRoleMap + testRole("buttontable_row", ROLE_NOTHING); + testRole("buttontable_cell", ROLE_NOTHING); + + // abstract roles + var abstract_roles = ["composite", "landmark", "structure", "widget", + "window", "input", "range", "select", "section", + "sectionhead"]; + for (a in abstract_roles) + testRole(abstract_roles[a], ROLE_SECTION); + + ////////////////////////////////////////////////////////////////////////// + // roles transformed by ARIA state attributes + testRole("togglebutton", ROLE_TOGGLE_BUTTON); + + ////////////////////////////////////////////////////////////////////////// + // ignore unknown roles, take first known + testRole("unknown_roles", ROLE_PUSHBUTTON); + + ////////////////////////////////////////////////////////////////////////// + // misc roles + testRole("note", ROLE_NOTE); + testRole("scrollbar", ROLE_SCROLLBAR); + testRole("dir", ROLE_LIST); + + ////////////////////////////////////////////////////////////////////////// + // test document role map update + var testDoc = getAccessible(document, [nsIAccessibleDocument]); + testRole(testDoc, ROLE_DOCUMENT); + document.body.setAttribute("role", "application"); + testRole(testDoc, ROLE_APPLICATION); + + // Test equation image + testRole("img_eq", ROLE_FLAT_EQUATION); + + // Test textual equation + testRole("txt_eq", ROLE_FLAT_EQUATION); + + SimpleTest.finish(); + } + + SimpleTest.waitForExplicitFinish(); + addA11yLoadEvent(doTest); + </script> +</head> +<body> + + <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=428479">Mozilla Bug 428479</a> + <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=429666">Mozilla Bug 429666</a> + <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=481114">Mozilla Bug 481114</a> + <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=469688">Mozilla Bug 469688</a> + <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=469688">Mozilla Bug 520188</a> + <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=529289">Mozilla Bug 529289</a> + <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=529289">Mozilla Bug 607219</a> + <a target="_blank" + title="HTML buttons with aria-pressed not exposing IA2 TOGGLE_BUTTON role" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=725432"> + Bug 725432 + </a> + <a target="_blank" + title="Map ARIA role FORM" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=735645"> + Bug 735645 + </a> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=1136563" + title="Support ARIA 1.1 switch role"> + Bug 1136563 + </a> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=1121518" + title="Support ARIA 1.1 searchbox role"> + Bug 1121518 + </a> + <p id="display"></p> + <div id="content" style="display: none"></div> + <pre id="test"> + </pre> + + <span id="aria_alert" role="alert"/> + <span id="aria_alertdialog" role="alertdialog"/> + <span id="aria_application" role="application"/> + <span id="aria_article" role="article"/> + <span id="aria_button" role="button"/> + <span id="aria_checkbox" role="checkbox"/> + <span id="aria_columnheader" role="columnheader"/> + <span id="aria_combobox" role="combobox"/> + <span id="aria_dialog" role="dialog"/> + <span id="aria_directory" role="directory"/> + <span id="aria_document" role="document"/> + <span id="aria_form" role="form"/> + <span id="aria_feed" role="feed"/> + <span id="aria_grid" role="grid"/> + <span id="aria_gridcell" role="gridcell"/> + <span id="aria_group" role="group"/> + <span id="aria_heading" role="heading"/> + <span id="aria_img" role="img"/> + <span id="aria_link" role="link"/> + <span id="aria_list" role="list"/> + <span id="aria_listbox" role="listbox"/> + <span id="aria_listitem" role="listitem"/> + <span id="aria_log" role="log"/> + <span id="aria_marquee" role="marquee"/> + <span id="aria_math" role="math"/> + <span id="aria_menu" role="menu"/> + <span id="aria_menubar" role="menubar"/> + <span id="aria_menuitem" role="menuitem"/> + <span id="aria_menuitemcheckbox" role="menuitemcheckbox"/> + <span id="aria_menuitemradio" role="menuitemradio"/> + <span id="aria_note" role="note"/> + <span id="aria_presentation" role="presentation" tabindex="0"/> + <span id="aria_progressbar" role="progressbar"/> + <span id="aria_radio" role="radio"/> + <span id="aria_radiogroup" role="radiogroup"/> + <span id="aria_region" role="region"/> + <span id="aria_row" role="row"/> + <span id="aria_rowheader" role="rowheader"/> + <span id="aria_scrollbar" role="scrollbar"/> + <span id="aria_searchbox" role="textbox"/> + <span id="aria_separator" role="separator"/> + <span id="aria_slider" role="slider"/> + <span id="aria_spinbutton" role="spinbutton"/> + <span id="aria_status" role="status"/> + <span id="aria_switch" role="switch"/> + <span id="aria_tab" role="tab"/> + <span id="aria_tablist" role="tablist"/> + <span id="aria_tabpanel" role="tabpanel"/> + <span id="aria_textbox" role="textbox"/> + <span id="aria_timer" role="timer"/> + <span id="aria_toolbar" role="toolbar"/> + <span id="aria_tooltip" role="tooltip"/> + <span id="aria_tree" role="tree"/> + <span id="aria_treegrid" role="treegrid"/> + <span id="aria_treeitem" role="treeitem"/> + + <article id="articlemain" role="main">a main area</article> + <article id="articleform" role="form">a form area</article> + + <div id="testArticle" role="article" title="Test article"> + <p>This is a paragraph inside the article.</p> + </div> + + <!-- "live" roles --> + <table role="log" id="log_table"> + <tr><td>Table based log</td></tr> + </table> + <h1 role="marquee" id="marquee_h1">marquee</h1> + <div role="timer" id="timer_div">timer</div> + + <!-- landmarks --> + <div role="application" id="application">application</div> + <div role="form" id="form">form</div> + + <!-- weak landmarks --> + <div role="banner" id="banner">banner</div> + <div role="complementary" id="complementary">complementary</div> + <div role="contentinfo" id="contentinfo">contentinfo</div> + <div role="main" id="main">main</div> + <div role="navigation" id="navigation">navigation</div> + <div role="search" id="search">search</div> + + <!-- landmarks are tables --> + <table role="application" id="application_table">application table + <tr><td>hi<td></tr></table> + <table role="banner" id="banner_table">banner table + <tr><td>hi<td></tr></table> + <table role="complementary" id="complementary_table">complementary table + <tr><td>hi<td></tr></table> + <table role="contentinfo" id="contentinfo_table">contentinfo table + <tr><td>hi<td></tr></table> + <table role="main" id="main_table">main table + <tr><td>hi<td></tr></table> + <table role="navigation" id="navigation_table">navigation table + <tr><td>hi<td></tr></table> + <table role="search" id="search_table">search table + <tr><td>hi<td></tr></table> + + <!-- test gEmptyRoleMap --> + <table role="button"> + <tr id="buttontable_row"> + <td id="buttontable_cell">cell</td> + </tr> + </table> + + <!-- user agents must not map abstract roles to platform API --> + <!-- test abstract base type roles --> + <div role="composite" id="composite">composite</div> + <div role="landmark" id="landmark">landmark</div> + <div role="roletype" id="roletype">roletype</div> + <div role="structure" id="structure">structure</div> + <div role="widget" id="widget">widget</div> + <div role="window" id="window">window</div> + <!-- test abstract input roles --> + <div role="input" id="input">input</div> + <div role="range" id="range">range</div> + <div role="select" id="select">select</div> + <!-- test abstract structure roles --> + <div role="section" id="section">section</div> + <div role="sectionhead" id="sectionhead">sectionhead</div> + + <!-- roles transformed by ARIA state attributes --> + <button aria-pressed="true" id="togglebutton"> + + <!-- take the first known mappable role --> + <div role="wiggly:worm abc123 button" id="unknown_roles">worm button</div> + + <!-- misc roles --> + <div role="note" id="note">note</div> + <div role="scrollbar" id="scrollbar">scrollbar</div> + + <div id="dir" role="directory"> + <div role="listitem">A</div> + <div role="listitem">B</div> + <div role="listitem">C</div> + </div> + + <p>Image: + <img id="img_eq" role="math" src="foo" alt="x^2 + y^2 + z^2"> + </p> + + <p>Text: + <span id="txt_eq" role="math" title="x^2 + y^2 + z^2">x<sup>2</sup> + + y<sup>2</sup> + z<sup>2</sup></span> + +</body> +</html> diff --git a/accessible/tests/mochitest/role/test_aria.xul b/accessible/tests/mochitest/role/test_aria.xul new file mode 100644 index 000000000..544034d1f --- /dev/null +++ b/accessible/tests/mochitest/role/test_aria.xul @@ -0,0 +1,72 @@ +<?xml version="1.0"?> +<?xml-stylesheet href="chrome://global/skin" type="text/css"?> +<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" + type="text/css"?> + +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + title="Accessibility Name Calculating Test."> + + <script type="application/javascript" + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> + + <script type="application/javascript" + src="../common.js"></script> + <script type="application/javascript" + src="../role.js" /> + + <script type="application/javascript"> + <![CDATA[ + function doTest() + { + ok(!isAccessible("presentation_label"), + "Presentation label shouldn't be accessible."); + ok(!isAccessible("presentation_descr"), + "Presentation description shouldn't be accessible."); + + // aria-pressed + testRole("pressed_button", ROLE_TOGGLE_BUTTON); + testRole("pressed_menu_button", ROLE_TOGGLE_BUTTON); + + SimpleTest.finish(); + } + + SimpleTest.waitForExplicitFinish(); + addA11yLoadEvent(doTest); + ]]> + </script> + + <hbox flex="1" style="overflow: auto;"> + + <body xmlns="http://www.w3.org/1999/xhtml"> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=494345" + title="Do not create accessibles for XUL label or description having a role of 'presentation'"> + Mozilla Bug 494345 + </a> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=1033283" + title="Expose pressed state on XUL menu toggle buttons"> + Mozilla Bug 1033283 + </a> + <p id="display"></p> + <div id="content" style="display: none"> + </div> + <pre id="test"> + </pre> + </body> + + <vbox flex="1"> + <label id="presentation_label" role="presentation" value="label"/> + <description id="presentation_descr" role="presentation" value="description"/> + <button id="pressed_button" aria-pressed="true" label="I am pressed" /> + <button id="pressed_menu_button" aria-pressed="true" label="I am pressed" type="menu-button"> + <menupopup> + <menuitem label="I am a menu item" /> + </menupopup> + </button> + </vbox> + + + </hbox> +</window> + diff --git a/accessible/tests/mochitest/role/test_general.html b/accessible/tests/mochitest/role/test_general.html new file mode 100644 index 000000000..40f522482 --- /dev/null +++ b/accessible/tests/mochitest/role/test_general.html @@ -0,0 +1,186 @@ +<!DOCTYPE html> +<html> +<head> + <title>test nsHyperTextAccessible accesible objects creation and their roles</title> + <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" /> + + <script type="application/javascript" + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> + + <script type="application/javascript" + src="../common.js"></script> + <script type="application/javascript" + src="../role.js"></script> + <script type="application/javascript" + src="../attributes.js"></script> + + <script type="application/javascript"> + function doTests() + { + // landmark tests section + testRole("frm", ROLE_FORM); + + // nsHyperTextAcc tests section + // Test html:form. + testRole("nav", ROLE_SECTION); + testRole("header", ROLE_HEADER); + testRole("footer", ROLE_FOOTER); + testRole("article", ROLE_DOCUMENT); + testRole("aside", ROLE_NOTE); + testRole("section", ROLE_SECTION); + + // Bug 996821 + // Check that landmark elements get accessibles with styled overflow. + testRole("section_overflow", ROLE_SECTION); + testRole("nav_overflow", ROLE_SECTION); + testRole("header_overflow", ROLE_HEADER); + testRole("aside_overflow", ROLE_NOTE); + testRole("footer_overflow", ROLE_FOOTER); + testRole("article_overflow", ROLE_DOCUMENT); + + // test html:div + testRole("sec", ROLE_SECTION); + + // Test html:blockquote + testRole("quote", ROLE_SECTION); + + // Test html:h, all levels + testRole("head1", ROLE_HEADING); + testRole("head2", ROLE_HEADING); + testRole("head3", ROLE_HEADING); + testRole("head4", ROLE_HEADING); + testRole("head5", ROLE_HEADING); + testRole("head6", ROLE_HEADING); + + // Test that an html:input @type="file" is exposed as ROLE_TEXT_CONTAINER. + // After fix for bug 471356, it was temporarily exposed as a paragraph, + // breaking JAWS compatibility. + testRole("data", ROLE_TEXT_CONTAINER); + + // Test regular paragraph by comparison to make sure exposure does not + // get broken. + testRole("p", ROLE_PARAGRAPH); + + // Test dl, dt, dd + testRole("definitionlist", ROLE_DEFINITION_LIST); + testRole("definitionterm", ROLE_TERM); + testRole("definitiondescription", ROLE_DEFINITION); + + // Has click, mousedown or mouseup listeners. + testRole("span1", ROLE_TEXT); + testRole("span2", ROLE_TEXT); + testRole("span3", ROLE_TEXT); + + // Test role of listbox inside combobox + testRole("listbox1", ROLE_COMBOBOX_LIST); + testRole("listbox2", ROLE_COMBOBOX_LIST); + + SimpleTest.finish(); + } + + SimpleTest.waitForExplicitFinish(); + addA11yLoadEvent(doTests); + </script> +</head> +<body> + + <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=472326" + title="html:input of type "file" no longer rendered to screen readers"> + Mozilla Bug 472326 + </a><br> + <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=474261" + title="Test remaining implementations in nsHyperTextAccessible::GetRole"> + bug 474261 + </a><br> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=423409" + title="Expose click action if mouseup and mousedown are registered"> + Mozilla Bug 423409 + </a> + <a target="_blank" + title="Provide mappings for html5 <nav> <header> <footer> <article>" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=593368"> + Bug 593368 + </a><br/> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=613502" + title="Map <article> like we do aria role article"> + Bug 613502 + </a> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=610650" + title="Change implementation of HTML5 landmark elements to conform"> + Bug 610650 + </a> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=614310" + title="Map section to pane (like role=region)"> + Mozilla Bug 614310 + </a> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=734982" + title="Map ARIA role FORM"> + Bug 734982 + </a> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=1044431" + title="Listbox owned by combobox has the wrong role"> + Mozilla Bug 1044431 + </a> + + <p id="display"></p> + <div id="content" style="display: none"></div> + <pre id="test"> + </pre> + + <form id="frm" action="submit.php" method="post"> + <label for="data">File</label>: + <input type="file" id="data" name="data" size="50"/> + </form> + + <nav id="nav">a nav</nav> + <header id="header">a header</header> + <footer id="footer">a footer</footer> + <article id="article">an article</article> + <aside id="aside">by the way I am an aside</aside> + <section id="section">a section</section> + + <section style="overflow: hidden;" id="section_overflow"> + <nav style="overflow: hidden;" + id="nav_overflow">overflow nav</nav> + <header style="overflow: hidden;" + id="header_overflow">overflow header</header> + <aside style="overflow: hidden;" + id="aside_overflow">overflow aside</aside> + <footer style="overflow: hidden;" + id="footer_overflow">overflow footer</footer> + </section> + <article style="overflow: hidden;" + id="article_overflow">overflow article</article> + + <p id="p">A paragraph for comparison.</p> + <div id="sec">A normal div</div> + <blockquote id="quote">A citation</blockquote> + <h1 id="head1">A heading level 1</h1> + <h2 id="head2">A heading level 2</h2> + <h3 id="head3">A heading level 3</h3> + <h4 id="head4">A heading level 4</h4> + <h5 id="head5">A heading level 5</h5> + <h6 id="head6">A heading level 6</h6> + + <dl id="definitionlist"> + <dt id="definitionterm">gecko</dt> + <dd id="definitiondescription">geckos have sticky toes</dd> + </dl> + + <span id="span1" onclick="">clickable span</span> + <span id="span2" onmousedown="">clickable span</span> + <span id="span3" onmouseup="">clickable span</span> + + <div id="combobox1" role="combobox"> + <div id="listbox1" role="listbox"></div> + </div> + <div id="combobox2" role="combobox" aria-owns="listbox2"></div> + <div id="listbox2" role="listbox"></div> +</body> +</html> diff --git a/accessible/tests/mochitest/role/test_general.xul b/accessible/tests/mochitest/role/test_general.xul new file mode 100644 index 000000000..d5982b63f --- /dev/null +++ b/accessible/tests/mochitest/role/test_general.xul @@ -0,0 +1,57 @@ +<?xml version="1.0"?> +<?xml-stylesheet href="chrome://global/skin" type="text/css"?> +<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" + type="text/css"?> + +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + title="Accessibility Role XUL Test."> + + <script type="application/javascript" + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> + + <script type="application/javascript" + src="../common.js"></script> + <script type="application/javascript" + src="../role.js"></script> + + <script type="application/javascript"> + <![CDATA[ + function doTest() + { + ok(!isAccessible("statusbarpanel"), + "statusbarpanel shouldn't be accessible."); + testRole("statusbarpanel-iconic", ROLE_PUSHBUTTON); + testRole("statusbarpanel-iconic-text", ROLE_PUSHBUTTON); + testRole("statusbar", ROLE_STATUSBAR); + + SimpleTest.finish(); + } + + SimpleTest.waitForExplicitFinish(); + addA11yLoadEvent(doTest); + ]]> + </script> + + <hbox flex="1" style="overflow: auto;"> + + <body xmlns="http://www.w3.org/1999/xhtml"> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=900097" + title="statusbarpanel shouldn't be a button accessible"> + Mozilla Bug 900097 + </a> + <p id="display"></p> + <div id="content" style="display: none"> + </div> + <pre id="test"> + </pre> + </body> + + <statusbarpanel id="statusbarpanel"></statusbarpanel> + <statusbarpanel id="statusbarpanel-iconic" class="statusbarpanel-iconic"></statusbarpanel> + <statusbarpanel id="statusbarpanel-iconic-text" class="statusbarpanel-iconic-text"></statusbarpanel> + <statusbar id="statusbar"></statusbar> + + </hbox> +</window> + diff --git a/accessible/tests/mochitest/role/test_svg.html b/accessible/tests/mochitest/role/test_svg.html new file mode 100644 index 000000000..164861dc8 --- /dev/null +++ b/accessible/tests/mochitest/role/test_svg.html @@ -0,0 +1,70 @@ +<!DOCTYPE html> +<html> +<head> + <title>SVG elements accessible roles</title> + <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" /> + + <script type="application/javascript" + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> + + <script type="application/javascript" + src="../common.js"></script> + <script type="application/javascript" + src="../role.js"></script> + <script type="application/javascript" + src="../attributes.js"></script> + + <script type="application/javascript"> + function doTests() + { + testRole("svg", ROLE_DIAGRAM); + testRole("rect", ROLE_GRAPHIC); + testRole("circle", ROLE_GRAPHIC); + testRole("ellipse", ROLE_GRAPHIC); + testRole("line", ROLE_GRAPHIC); + testRole("polygon", ROLE_GRAPHIC); + testRole("polyline", ROLE_GRAPHIC); + testRole("path", ROLE_GRAPHIC); + testRole("image", ROLE_GRAPHIC); + + SimpleTest.finish(); + } + + SimpleTest.waitForExplicitFinish(); + addA11yLoadEvent(doTests); + </script> +</head> +<body> + + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=822983" + title="Map SVG graphic elements to accessibility API"> + Bug 822983 + </a> + + <p id="display"></p> + <div id="content" style="display: none"></div> + <pre id="test"> + </pre> + + <svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg" + xmlns:xlink="http://www.w3.org/1999/xlink"> + <rect width="300" height="100" id="rect" + style="fill:rgb(0,0,255);stroke-width:1;stroke:rgb(0,0,0)"/> + <circle cx="100" cy="50" r="40" stroke="black" id="circle" + stroke-width="2" fill="red"/> + <ellipse cx="300" cy="80" rx="100" ry="50" id="ellipse" + style="fill:yellow;stroke:purple;stroke-width:2"/> + <line x1="0" y1="0" x2="200" y2="200" id="line" + style="stroke:rgb(255,0,0);stroke-width:2"/> + <polygon points="200,10 250,190 160,210" id="polygon" + style="fill:lime;stroke:purple;stroke-width:1"/> + <polyline points="20,20 40,25 60,40 80,120 120,140 200,180" id="polyline" + style="fill:none;stroke:black;stroke-width:3" /> + <path d="M150 0 L75 200 L225 200 Z" id="path"/> + <image x1="25" y1="80" width="50" height="20" id="image" + xlink:href="../moz.png"/> + </svg> + +</body> +</html> |