<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>89103</bug_id>
          
          <creation_ts>2012-06-14 08:02:31 -0700</creation_ts>
          <short_desc>Should be easier to write cross-platform accessibility layout tests</short_desc>
          <delta_ts>2013-12-20 11:57:34 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Accessibility</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dominic Mazzoni">dmazzoni</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aboxhall</cc>
    
    <cc>cfleizach</cc>
    
    <cc>jcraig</cc>
    
    <cc>mkwst</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>649178</commentid>
    <comment_count>0</comment_count>
    <who name="Dominic Mazzoni">dmazzoni</who>
    <bug_when>2012-06-14 08:02:31 -0700</bug_when>
    <thetext>Right now any layout test of the role of an element must be customized for each platform. If the author of the test doesn&apos;t have the ability to generate different expectations and verify they&apos;re correct, many tests end up being written that only work on one platform.

Ideas:
* Add an accessor to accessibilityUIElement for a cross-platform role string.
* Add a method to search the tree for the first instance of a cross-platform role</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>649181</commentid>
    <comment_count>1</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2012-06-14 08:06:16 -0700</bug_when>
    <thetext>See https://bugs.webkit.org/show_bug.cgi?id=88911 as an example of such a test that ends up being mac only, though there&apos;s nothing really mac-specific about it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>649186</commentid>
    <comment_count>2</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2012-06-14 08:08:27 -0700</bug_when>
    <thetext>Moving Dominic&apos;s comments from that bug here:

&gt; &gt; BTW, I would really like to see a way to write &quot;cross-platform&quot; accessibility tests that test for the WebCore role rather than the platform-specific role, I just haven&apos;t had a chance to think about how to do that refactoring yet.
&gt;
&gt; I&apos;ve only taken a very quick look at the code, but it seems like it should be possible to set up a mechanism to test the &quot;real&quot; role in DumpRenderTree by adding some methods to AccessibilityUIElement. Maybe with an enum hanging around that&apos;s mapped onto ARIARoleMap?
&gt;
&gt; Seomthing like AccessibilityUIElement::isRole([enum]) and AccessibilityUIElement::isRoleDescription([enum])?
&gt;
&gt; Is there a bug for this sort of refactoring? It sounds like it&apos;d be useful...

Added a new bug:
https://bugs.webkit.org/show_bug.cgi?id=89103

isRole wouldn&apos;t work very well, we&apos;d have to expose the enum to JavaScript. Instead we should just expose the WebCore role name as a string in JavaScript, and make it a compile error to add a new role without adding the role name.

I don&apos;t think we need to have role descriptions in cross-platform tests, that&apos;s a Mac-only concept. The WebCore role enum should encompass all distinct roles, and each platform should map a role to whatever makes sense on that platform - on Mac one role might map to a {role, roleDescription} tuple.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>649345</commentid>
    <comment_count>3</comment_count>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2012-06-14 11:46:24 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Moving Dominic&apos;s comments from that bug here:
&gt; 
&gt; &gt; &gt; BTW, I would really like to see a way to write &quot;cross-platform&quot; accessibility tests that test for the WebCore role rather than the platform-specific role, I just haven&apos;t had a chance to think about how to do that refactoring yet.
&gt; &gt;
&gt; &gt; I&apos;ve only taken a very quick look at the code, but it seems like it should be possible to set up a mechanism to test the &quot;real&quot; role in DumpRenderTree by adding some methods to AccessibilityUIElement. Maybe with an enum hanging around that&apos;s mapped onto ARIARoleMap?
&gt; &gt;
&gt; &gt; Seomthing like AccessibilityUIElement::isRole([enum]) and AccessibilityUIElement::isRoleDescription([enum])?
&gt; &gt;
&gt; &gt; Is there a bug for this sort of refactoring? It sounds like it&apos;d be useful...
&gt; 
&gt; Added a new bug:
&gt; https://bugs.webkit.org/show_bug.cgi?id=89103
&gt; 
&gt; isRole wouldn&apos;t work very well, we&apos;d have to expose the enum to JavaScript. Instead we should just expose the WebCore role name as a string in JavaScript, and make it a compile error to add a new role without adding the role name.
&gt; 
&gt; I don&apos;t think we need to have role descriptions in cross-platform tests, that&apos;s a Mac-only concept. The WebCore role enum should encompass all distinct roles, and each platform should map a role to whatever makes sense on that platform - on Mac one role might map to a {role, roleDescription} tuple.

I think we should have DRT specific method that can get the roleValue() from AccessibilityObject and then convert that into a neutral string that we can test against in the layout tests</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>961975</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2013-12-20 11:57:34 -0800</bug_when>
    <thetext>&lt;rdar://problem/15710362&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>