Closed Bug 516133 Opened 11 years ago Closed 11 years ago

ARIA treegrid role on HTML:table makes thead/tbody accessible

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
status1.9.2 --- beta2-fixed

People

(Reporter: surkov, Assigned: surkov)

References

(Blocks 2 open bugs, )

Details

(Keywords: access, verified1.9.2)

Attachments

(1 file)

simple testcase:

<table role="treegrid" id="grid" border="1" cellpadding="10" cellspacing="0">
    <thead>
      <tr role="row">
        <th role="columnheader">subject</td>
        <th role="columnheader">sender</th>
        <th role="columnheader">date</th>
      </tr>
    </thead>
    <tbody>
      <tr role="row">
        <td role="gridcell" tabindex="0">about everything</td>
        <td role="gridcell">president</td>
        <td role="gridcell">today</td>
      </tr>
      <tr role="row">
        <td role="gridcell">new bugs</td>
        <td role="gridcell">mozilla team</td>
        <td role="gridcell">today</td>
      </tr>
    </tbody>
  </table>
Attached patch patchSplinter Review
mochitests fails because of bug 516135 (cell's rowExtent fails), I suggest to check in this bug after that one.
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #400242 - Flags: review?(marco.zehe)
Attachment #400242 - Flags: review?(bolterbugz)
Comment on attachment 400242 [details] [diff] [review]
patch

>+     href="https://bugzilla.mozilla.org/show_bug.cgi?id=491683">Mozilla Bug 516133</a>

Nit: Wrong bug number in the href attribute, the actual link text is correct.

r=me with that fixed.
Attachment #400242 - Flags: review?(marco.zehe) → review+
Comment on attachment 400242 [details] [diff] [review]
patch

>-          if (tableAccessible &&
>-              nsAccUtils::Role(tableAccessible) != nsIAccessibleRole::ROLE_TABLE) {
>-            NS_ASSERTION(!roleMapEntry, "Should not be changing ARIA role, just overriding impl class role");
>-            // Not in table: override role (roleMap entry was null).
>-            roleMapEntry = &nsARIAMap::gEmptyRoleMap;
>+          if (tableAccessible) {
>+            PRUint32 role = nsAccUtils::Role(tableAccessible);
>+            if (role != nsIAccessibleRole::ROLE_TABLE &&
>+                role != nsIAccessibleRole::ROLE_TREE_TABLE) {
>+
>+              NS_ASSERTION(!roleMapEntry,
>+                           "Should not be changing ARIA role, just overriding impl class role");
>+              // Not in table: override role (roleMap entry was null).

I don't understand this case, or when it happens.

>+              roleMapEntry = &nsARIAMap::gEmptyRoleMap;
>+            }
>           }
>           break;
I think it never happens !roleMapEntry can't be false because it is true on top if statement. Sort of rudiment I think.
I guess we can remove the assertion then... but I'm also not sure I understand the comment "// Not in table: override role (roleMap entry was null)."

How would we have a tableAccessible, not be in a table, and not have a roleMapEntry?
(In reply to comment #5)
> I guess we can remove the assertion then... but I'm also not sure I understand
> the comment "// Not in table: override role (roleMap entry was null)."
> 
> How would we have a tableAccessible, not be in a table, and not have a
> roleMapEntry?

it's easy <table role="log"><td role="bla"></td><td></td></table>

these cells shouldn't be a table cells, therefore we override their ARIA role. That's how it worked earlier I think.
Attachment #400242 - Flags: review?(bolterbugz) → review+
Comment on attachment 400242 [details] [diff] [review]
patch

OK r=me... but:

(In reply to comment #6)
> (In reply to comment #5)
> > I guess we can remove the assertion then... but I'm also not sure I understand
> > the comment "// Not in table: override role (roleMap entry was null)."
> > 
> > How would we have a tableAccessible, not be in a table, and not have a
> > roleMapEntry?
> 
> it's easy <table role="log"><td role="bla"></td><td></td></table>
> 

>+              // Not in table: override role (roleMap entry was null).

Please add an example as a comment here. Thanks!
landed on 1.9.3 with David's comment - http://hg.mozilla.org/mozilla-central/rev/66058a1c016c
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
OS: Windows XP → All
Attachment #400242 - Flags: approval1.9.2?
Comment on attachment 400242 [details] [diff] [review]
patch

Needed for completion of a11y support for tables in 3.6. See https://wiki.mozilla.org/Accessibility/Remaining_Mozilla-1.9.2_Nominations for more info.
Comment on attachment 400242 [details] [diff] [review]
patch

a192=beltzner
Attachment #400242 - Flags: approval1.9.2? → approval1.9.2+
Verified fixed in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2b2pre) Gecko/20091029 Namoroka/3.6b2pre (.NET CLR 3.5.30729)
You need to log in before you can comment on or make changes to this bug.