Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packages/blockly/core/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,9 @@ input[type=number] {
.blocklyComment,
.blocklyBubble,
.blocklyIconGroup,
.blocklyTextarea
.blocklyTextarea,
.blocklyZoom,
.blocklyTrash,
) {
outline: none;
}
Expand Down Expand Up @@ -559,7 +561,10 @@ input[type=number] {
/* Icons with active focus. */
.blocklyKeyboardNavigation
.blocklyActiveFocus.blocklyIconGroup
> .blocklyIconShape:first-child {
> .blocklyIconShape:first-child,
.blocklyKeyboardNavigation
.blocklyActiveFocus
> .blocklyFocusRing {
stroke: var(--blockly-active-node-color);
stroke-width: var(--blockly-selection-width);
}
Expand Down
15 changes: 15 additions & 0 deletions packages/blockly/core/trashcan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,21 @@ export class Trashcan
'id': this.uniqueId,
});

dom.createSvgElement(
Svg.RECT,
{
'width': WIDTH + 8,
'height': BODY_HEIGHT + LID_HEIGHT + 8,
'x': -4,
'y': -4,
'rx': 2,
'ry': 2,
'fill': 'none',
'class': 'blocklyFocusRing',
},
this.svgGroup,
);

aria.setRole(this.svgGroup, aria.Role.BUTTON);
aria.setState(this.svgGroup, aria.State.LABEL, Msg['OPEN_TRASH']);

Expand Down
42 changes: 42 additions & 0 deletions packages/blockly/core/zoom_controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,20 @@ class ZoomInControl extends ZoomControl {
zoomControlContainer,
);
aria.setState(group, aria.State.LABEL, Msg['ZOOM_IN']);
dom.createSvgElement(
Svg.RECT,
{
'width': 40,
'height': 40,
'x': -4,
'y': -4,
'rx': 2,
'ry': 2,
'fill': 'none',
'class': 'blocklyFocusRing',
},
group,
);
const clip = dom.createSvgElement(
Svg.CLIPPATH,
{'id': 'blocklyZoominClipPath' + rnd},
Expand Down Expand Up @@ -170,6 +184,20 @@ class ZoomOutControl extends ZoomControl {
zoomControlContainer,
);
aria.setState(group, aria.State.LABEL, Msg['ZOOM_OUT']);
dom.createSvgElement(
Svg.RECT,
{
'width': 40,
'height': 40,
'x': -4,
'y': -4,
'rx': 2,
'ry': 2,
'fill': 'none',
'class': 'blocklyFocusRing',
},
group,
);
const clip = dom.createSvgElement(
Svg.CLIPPATH,
{'id': 'blocklyZoomoutClipPath' + rnd},
Expand Down Expand Up @@ -217,6 +245,20 @@ class ZoomResetControl extends ZoomControl {
zoomControlContainer,
);
aria.setState(group, aria.State.LABEL, Msg['RESET_ZOOM']);
dom.createSvgElement(
Svg.RECT,
{
'width': 40,
'height': 40,
'x': -4,
'y': -4,
'rx': 2,
'ry': 2,
'fill': 'none',
'class': 'blocklyFocusRing',
},
group,
);
const clip = dom.createSvgElement(
Svg.CLIPPATH,
{'id': 'blocklyZoomresetClipPath' + rnd},
Expand Down
Loading