Closed Bug 976630 Opened 11 years ago Closed 10 years ago

[Settings] Non-current sections are still visible to screen reader.

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: eeejay, Assigned: eeejay)

References

Details

(Keywords: access)

Attachments

(2 files)

This was originally fixed in bug #914882 and, is a regression of bug #920623.
After some testing, I didn't notice any performance difference.
Attachment #8381503 - Flags: review?(kaze)
Comment on attachment 8381503 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16625

Vivien, do you remember if we had a particular reason to remove the visibility rules in your patch for bug 810499?
Attachment #8381503 - Flags: feedback?(21)
Eitan, some unit tests to ensure the non-active panels are either in visibility: hidden or display: none would be helpful. Could you add another commit for that in your PR?
Comment on attachment 8381503 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16625

(In reply to Fabien Cazenave [:kaze] from comment #3)
> Comment on attachment 8381503 [details]
> Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16625
> 
> Vivien, do you remember if we had a particular reason to remove the
> visibility rules in your patch for bug 810499?

I don't remember the exact reasons while I supposed it could have been to avoid a flash.

In all cases this patch is going to be obsoleted by the patch from Mason in bug 976299 who is probably going to do some tricks to ends up with display: none on some panels.

I proposed that you wait a bit to see Mason's progress before going any further.
Attachment #8381503 - Flags: feedback?(21)
Thanks. Standing by..
Mason, I see you chose to set the height to zero rather than setting the visibility to hidden in bug 976299. What’s your take on this patch? We still need a visibility: hidden (or display: none) property for accessibility, but we don’t want any flash nor any performance regression.

Do we need both? (= height: 0 and visibility: hidden)
Can we use visibility: hidden without getting any flash?

I think we used to toggle the panel visibility or display with a setTimeout in the JS code to ensure it’s shown/hidden *after* the transition is done. I’d certainly prefer to avoid re-introducing such a trick… but if that’s the only way to preserve accessibility and performances, we’ll cope with that.

I’m on PTO for a week. I think we should wait for the 1.4 branching before landing this patch, but if you want to land this before 2013-03-15 you can ping Arthur for the review. Thanks!
Flags: needinfo?(mchang)
The problem with visibility=hidden or visible is that the DOM nodes still stay in memory. They just become hidden / unhidden. The problem with display: none is that it killed all the animations between the panels, while saving the memory. I originally did bug 976299 to save one layer in the layer tree in gecko. Using display: none saves the layer but prevents animations. Using visibility doesn't save the layer. Maybe you can try the visible trick and see if it solves your problem? If so, I can take a look at the layer tree after and make sure we didn't regress there.

What do you mean by any flash?
Flags: needinfo?(mchang)
Comment on attachment 8381503 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16625

Updated this pull request. I think that toggling visibility *along* with the height hack that mchang introduced may meet both the perf needs, and the accessibility needs. Does this look good?
Attachment #8381503 - Flags: review?(kaze) → feedback?(mchang)
Attached file Layer Tree Dumps (deleted) —
Comment on attachment 8381503 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16625

Layer tree wise, it looks ok. But now we have the visual regression of a flash when animating between panels. Maybe you can eliminate the flash with setting visibility on the previous panel as well?
Attachment #8381503 - Flags: feedback?(mchang) → feedback-
(In reply to Mason Chang [:mchang] from comment #11)
> Comment on attachment 8381503 [details]
> Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16625
> 
> Layer tree wise, it looks ok. But now we have the visual regression of a
> flash when animating between panels. Maybe you can eliminate the flash with
> setting visibility on the previous panel as well?

If the panel is not on the screen it would defeat the purpose of the patch.

Perhaps we could have the visibility changed with a 1s delay?
Comment on attachment 8381503 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16625

Ok. I played with this more. It looks like if the visibility transition is removed altogether when we go from hidden->visible the flashing is avoided.

Not sure why this works, since a hidden->visible transition should always become visible immediately. So removing the transition should not be necessary. Maybe the height changes throw a wrench in the optimized path.
Attachment #8381503 - Flags: feedback- → feedback?(mchang)
Comment on attachment 8381503 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16625

Just tried, looks good. Animations seem smoother now too. Thanks!
Attachment #8381503 - Flags: feedback?(mchang) → feedback+
Comment on attachment 8381503 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16625

Thanks!
Attachment #8381503 - Flags: review?(kaze)
Comment on attachment 8381503 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16625

Thank you all for your feedback.
Attachment #8381503 - Flags: review?(fabien) → review+
https://github.com/mozilla-b2g/gaia/commit/a94a2d0ee2d197360a0ab1e1ebba1f61b9354634

Updated an integration test too.
Assignee: nobody → eitan
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Blocks: 1003736
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: