User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20090116 Minefield/3.2a1pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20090116 Minefield/3.2a1pre ID:20090116035550 When a html table cell (<td>) contains content, this content all gets included in its accessible name. This can become annoying especially in web applications as screen readers may read all the content as it is the name of the cell, when moving to one of its descendants with the focus. I attach an html example which shows that the accessible name of the table cell contains all its textual content. ARIA has rules in which its ok to include descendants in the name, but I feel for generic table cells (that are not focusable themselves) this should not happen. Reproducible: Always Steps to Reproduce: 1. Open the attached html example in Firefox 3.2 2. Using either NVDA's object navigation or Accessibility Probe, navigate to the single cell in the table. 3. Take note of its accessible name. Actual Results: The accessible name contains the text of the paragraph, the link and the list, which are contained within the table cell. Expected Results: The table cell should have an empty accessible name. This bug does not seem to occure in Firefox 3.0. I am not sure about 3.1, but I am definit about it happening in 3.2a1.
the reason is bug 467139, "NameFromSubtree" rule should be based on accessible role. ARIA role "gridcell" (ROLE_CELL) allows to get the name from subtree and Marco said this is correct. HTML td (ROLE_CELL) shouldn't allow to get name. Aaron, can you comment this?
Ok, we need a separate nsIAccessible role then, for table cell vs. gridcell. This probably already works alright for listitem vs. option -- I believe we use separate roles for those, even though the MSAA role is the same.
Created attachment 357773 [details] [diff] [review] Patch
Assignee: nobody → marco.zehe
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #357773 - Flags: review?(aaronleventhal)
>It sounds gridcell role is used in html:tables only to allow name computing >from subtree? That's what I understood, yes.
>would be nice to save name testing for bug 468034. Well, the thought was to test the name now while checking in the patch, and then replace this with the name calculation once we have bug 468034 actually landed. Since the main point of this bug is to fix the name calculation, I am thinking about removing the role testing entirely. To the outside world, there is no difference anyway, and even our internal API uses it only for the name calculation rule, but exposes it as a ROLE_CELL in any case. What do you think?
Comment on attachment 357773 [details] [diff] [review] Patch I did not look at the tests, but the rest of the patch looks exactly correct. There are a couple of whitespace nits that need to be addressed, so you might ask someone else to check it in for you with whitespace changes. Nice work.
Attachment #357773 - Flags: review?(aaronleventhal) → review+
(In reply to comment #7) > >would be nice to save name testing for bug 468034. > > Well, the thought was to test the name now while checking in the patch, and > then replace this with the name calculation once we have bug 468034 actually > landed. Fine with me. Just XXX sections would be good to remember. > Since the main point of this bug is to fix the name calculation, I am thinking > about removing the role testing entirely. I do not see anything bad with role testing. It may be good think, additional protection and so on. > To the outside world, there is no > difference anyway, and even our internal API uses it only for the name > calculation rule, but exposes it as a ROLE_CELL in any case. What do you think? No, actually, I believe it exposes ROLE_GRID_CELL role, I just missed error in your mochitest is(acc.role, aRole, "Wrong role for " + aID + "!"); you should test finalRole actually. I think "role" will be removed eventually from scriptable interface.
(In reply to comment #8) > (From update of attachment 357773 [details] [diff] [review]) > There are a couple of whitespace nits that need to be addressed, so you might > ask someone else to check it in for you with whitespace changes. Nice work. If there are wrong white space then I can fix and file new patch.
I'll put up a new patch soon, just running a build to check that I got all the renames and Makefile entries right. This patch will then hopefully address all nits.
Created attachment 357784 [details] [diff] [review] Patch2 1. Now properly tests for ROLE_GRID_CELL. 2. Hopefully fixed whitespace nits. I found one in nsNameUtil.cpp. 3. Hopefully addressed all other comments.
Comment on attachment 357784 [details] [diff] [review] Patch2 looks ok, I'll check whitespaces
Attachment #357784 - Flags: review?(surkov.alexander) → review+
Created attachment 357785 [details] [diff] [review] patch - few nits mostly all is ok with whitespaces, I fixed two nits.
Created attachment 357786 [details] [diff] [review] with new files but I forgot to add new files
Attachment #357785 - Attachment is obsolete: true
Pushed in changeset: http://hg.mozilla.org/mozilla-central/rev/f177a1157d4b with Surkov's whitespace fixes.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.