Repository navigation
v0.1.1
What a screen reader is told and can do:
GlassSwitchandGlassSlidertake asemanticLabel. A screen reader steps
GlassSliderwith increase and decrease, bysemanticStep(a tenth by
default), throughonChangeStart,onChangedandonChangeEnd, and never
past either end.GlassButtontakes asemanticLabelthat is read in place of its child,
for a button that is only an icon.showGlassSheettakes abarrierLabel, asshowGlassDialogalready did.
GlassMenuAnchorandGlassPopoverAnchortake one too. Their barrier used
to be a tap target with no label, so a screen reader had no way to close a
popover.
On a page:
showGlassSheettakesconstraints, asshowModalBottomSheetdoes. A
maxWidthkeeps the sheet at its content's width, centred, on a window
wider than that. Null, it spans the window as before.- The labels of
GlassButton,GlassSegmentedControlandGlassTabBarare
not text to select. Under aSelectionArea, a drag across the page used to
take them along with the prose around them.
Fixed:
- Glass draws on CanvasKit, which is every Safari and every browser without
WasmGC. CanvasKit keeps a fragment shader's uniforms by reference until the
picture is rasterized, and the glass released its shaders straight after
the draw. So it drew from freed memory: a shape in the wrong place, a solid
grey or green slab, a different one each frame. On the web a shader now
lives as long as the picture drawn with it. - Glass standing on glass no longer moves what is under the glass it stands
on. When a level was captured, the walk painted the levels below it, and a
CompositedTransformTargetamong them wrote the walk's offset into its own
liveLeaderLayer. ASelectionAreacreates one. So with a popover open
over a bar, the bar's text jumped right and down, and it stayed there until
the bar repainted. The walk now puts back every live offset it touches. - A
GlassGroupdrawn in tiles no longer loses members on the web. Skwasm's
fragment shader keeps its uniforms by reference rather than copying them on
each draw, so every tile drew the last tile's members, and blobs flickered
in and out. On the web each tile now gets its own shader. - A platform view or a
Textureis a hole in the capture of an upper level,
as it already was in the base level. It used to be a grey stub. On the web
everySelectionArealays a transparent platform view under what it holds,
so a bar over a selectable page showed grey.
Documented:
- The README says what the glass costs on the web outside Chromium — Safari,
Firefox and every browser on iOS, Chrome for iOS included, get CanvasKit,
where each capture is a synchronous GPU readback — and what to do about it:
allow Skwasm on WebKit, or declare a cheaper rung where CanvasKit remains.