Closed
Bug 366340
Opened 18 years ago
Closed 18 years ago
List items should not have SHOWING state when they are scrolled off
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: wwalker, Assigned: aaronlev)
References
(Blocks 2 open bugs)
Details
(Keywords: access)
Attachments
(3 files, 1 obsolete file)
1.09 KB,
text/html
|
Details | |
5.01 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
3.80 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a2pre) Gecko/20070107 Minefield/3.0a2pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a2pre) Gecko/20070107 Minefield/3.0a2pre
List items that are not SHOWING have the SHOWING state set. They should not have their SHOWING state set if they are not painted on the screen. Thanks!
Reproducible: Always
Steps to Reproduce:
1. Open the attached HTML content in Firefox
2. Examine the hierarchy using at-poke
Actual Results:
You'll see that list items and items in combo boxes have their SHOWING state set even if they are not painted on the screen.
Expected Results:
Only the items that are intended to be painted on the screen (i.e., the ones that are visually scrolled to in the list) should have their SHOWING state set.
Reporter | ||
Comment 1•18 years ago
|
||
Test case.
Assignee | ||
Comment 2•18 years ago
|
||
SHOWING should only be set if something isn't scrolled offscreen, correct?
This is different from VISIBLE which just means that it's programatically visible, and whether or not it's currently scrolled on screen or not is not at issue for VISIBLE.
Assignee: nobody → aaronleventhal
Blocks: keya11y
Component: Disability Access → Disability Access APIs
Product: Firefox → Core
QA Contact: disability.access → accessibility-apis
Version: unspecified → Trunk
Reporter | ||
Comment 3•18 years ago
|
||
(In reply to comment #2)
> SHOWING should only be set if something isn't scrolled offscreen, correct?
I believe so. Thanks!
Depends on: statesa11y
Updated•18 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 4•18 years ago
|
||
We don't use the SHOWING state correctly anywhere then -- the problem is not limited to lists.
I have implemented SHOWING in bug 367412, and that will hopefully fix this as well.
Assignee | ||
Comment 5•18 years ago
|
||
This is still a bug even after bug 367412. For some reason our SHOWING algorithm in nsAccessible::IsVisible() isn't working inside a listbox.
Assignee | ||
Updated•18 years ago
|
Assignee | ||
Comment 6•18 years ago
|
||
Is there an obvious reason this is happening?
Severity: normal → major
Comment 7•18 years ago
|
||
I wonder did bug 370455 fix this?
Comment 8•18 years ago
|
||
several points
1. 370455 doesn't fix it.
2. this bug is due to box model is created for all options. therefore options rectVisibility is considered to be visible. i talked with roc on irc and roc think it seems to be a bug
3. do we really need to set the SHOWING attribute rightly here for options? i don't think it gives too much help for users.
Assignee | ||
Comment 9•18 years ago
|
||
Can you explain #2 better? I'd be surprised if we can't tell when something is scrolled off.
Assignee | ||
Comment 10•18 years ago
|
||
Do we need to override this state in nsHTMLOptionAccessible::GetState()?
You could check the bounds against the parent bounds.
Comment 11•18 years ago
|
||
(In reply to comment #9)
> Can you explain #2 better? I'd be surprised if we can't tell when something is
> scrolled off.
>
go to the test case page, use domi to see option's box model. both (x,y) and (width, height) is created.
Comment 12•18 years ago
|
||
(In reply to comment #10)
> Do we need to override this state in nsHTMLOptionAccessible::GetState()?
>
> You could check the bounds against the parent bounds.
>
good idea!
still the question, does that provide more meaningful info for users?
Assignee | ||
Comment 13•18 years ago
|
||
Apparently it has some impact on Orca. Ask Will Walker. This is listed as "USABILITY PROBLEM - MUST BE FIXED -- Orca reads too much (i.e., items that are not showing)" at http://live.gnome.org/Orca/MozillaBugs
In addition, I expect that it affects screen magnifiers, because they may want to highlight words as they read through the list of options.
Comment 14•18 years ago
|
||
if select is collapsed, remove SHOWING state
Attachment #259986 -
Flags: review?(aaronleventhal)
Assignee | ||
Comment 15•18 years ago
|
||
Comment on attachment 259986 [details] [diff] [review]
patch
I'm on vacation, so get reviews from surkov. Also, make sure that when the list is not collapsed, that scrolled-off items are not marked SHOWING.
Attachment #259986 -
Flags: review?(aaronleventhal) → review?(surkov.alexander)
Comment 16•18 years ago
|
||
(In reply to comment #15)
> (From update of attachment 259986 [details] [diff] [review])
> Also, make sure that when the list
> is not collapsed, that scrolled-off items are not marked SHOWING.
>
Nian, do you like to fix it in this patch?
Comment 17•18 years ago
|
||
Comment on attachment 259986 [details] [diff] [review]
patch
>+ /**
>+ * Get Select element's accessible state
>+ */
>+ nsIContent* GetSelectState(PRUint32* aState);
nit: document better, your method has two output arguments.
> /**
> * As a nsHTMLSelectOptionAccessible we can have the following states:
> * STATE_SELECTABLE
> * STATE_SELECTED
>@@ -585,18 +571,25 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessib
> if ( option ) {
> PRBool isSelected = PR_FALSE;
> option->GetSelected(&isSelected);
> if ( isSelected )
> *_retval |= STATE_SELECTED;
Should be nsIAccessibleStates::STATE_SELECTED.
>+ nsCOMPtr<nsIDOMNode> selectNode(do_QueryInterface(content));
>+ if (selectNode) {
>+ nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
Use GetAccService() instead.
>+ nsCOMPtr<nsIAccessible> selAcc;
>+ accService->GetAccessibleFor(selectNode, getter_AddRefs(selAcc));
>+ if (selAcc) {
>+ PRUint32 state;
unused variable
with those fixed r=me
Attachment #259986 -
Flags: review?(surkov.alexander) → review+
Comment 18•18 years ago
|
||
Updated•18 years ago
|
Assignee: aaronleventhal → nian.liu
Comment 20•18 years ago
|
||
What's about comment #15?
Comment 21•18 years ago
|
||
it has no conflict with non-collapsed list.
or does it should be fixed in this patch if there is such a bug?
Assignee | ||
Comment 22•18 years ago
|
||
Look at the "Which sports do you like?" listbox in the testcase.
For me, the last item "Baseball" is scrolled off. That should not be marked SHOWING.
If it is still marked SHOWING, then this bug should be reopened and that should be fixed here. It's part of the original bug summary.
If it works already, then great!
Comment 23•18 years ago
|
||
(In reply to comment #22)
> Look at the "Which sports do you like?" listbox in the testcase.
>
> For me, the last item "Baseball" is scrolled off. That should not be marked
> SHOWING.
>
> If it is still marked SHOWING, then this bug should be reopened and that should
> be fixed here. It's part of the original bug summary.
>
> If it works already, then great!
>
it's too long for me away from the bug before i'm back to it.
i'll fix the issue with another patch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 24•18 years ago
|
||
although the view is visible, the frame owns the view may not visible. looking at the test case with domi box model, we can see
list (10, 106) to (98, 160), "base ball" (10, 155) to (79, 181). note: only 160-155 = 5 is visible comparing whole height is 181-155 = 16
looking at nsAccessible::IsVisible, we can see containing view is same for all list items.
questions here is that under such scenerio, what's the rule to decide whether the accessible object is visible or not?
Assignee | ||
Comment 25•18 years ago
|
||
> only 160-155 = 5 is visible comparing whole height is 181-155 = 16
Do you mean 5 pixels of the top of "Baseball" should be visible? Something must be wrong then, because I would expect at least a little bit of the tops of some of the letters. Are both sounds of coordinates relative to the same thing?
You might want to change the testcase to add a few more items to the list or descrease the height of the listbox, to make it a more useful testcase.
Compare the bounds of the listitem with the listbox. You should require a minimal number of pixels to be visible so that it's not just the tops of letters visible. See how we do it in nsAccessible::IsVisible() using kMinPixels. Why is nsAccessible::IsVisible() not working. Is the listbox not its own view?
Comment 26•18 years ago
|
||
(In reply to comment #25)
> > only 160-155 = 5 is visible comparing whole height is 181-155 = 16
>
> Do you mean 5 pixels of the top of "Baseball" should be visible?
yep
> be wrong then, because I would expect at least a little bit of the tops of some
> of the letters. Are both sounds of coordinates relative to the same thing?
>
yep, that what domi describes
> You might want to change the testcase to add a few more items to the list or
> descrease the height of the listbox, to make it a more useful testcase.
>
> Compare the bounds of the listitem with the listbox. You should require a
> minimal number of pixels to be visible so that it's not just the tops of
> letters visible. See how we do it in nsAccessible::IsVisible() using
> kMinPixels. Why is nsAccessible::IsVisible() not working. Is the listbox not
> its own view?
listbox is, listbox item uses listbox's view, that's why it's always visible
Assignee | ||
Updated•18 years ago
|
Assignee: nian.liu → aaronleventhal
Status: REOPENED → NEW
Assignee | ||
Comment 27•18 years ago
|
||
I have posted a fix to bug 379678.
Assignee | ||
Updated•18 years ago
|
Status: NEW → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 28•18 years ago
|
||
Fix checked in with bug 379678.
You need to log in
before you can comment on or make changes to this bug.
Description
•