mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
Add correct focus behavior for the modal. Update boundary sounds.
This commit is contained in:
@@ -25,39 +25,45 @@
|
||||
|
||||
blocklyApp.workspace = new Blockly.Workspace();
|
||||
|
||||
blocklyApp.AppView = ng.core
|
||||
.Component({
|
||||
selector: 'blockly-app',
|
||||
template: `
|
||||
<div *ngIf="getStatusMessage()" aria-hidden="true" class="blocklyAriaLiveStatus">
|
||||
<span aria-live="polite" role="status">{{getStatusMessage()}}</span>
|
||||
</div>
|
||||
blocklyApp.AppView = ng.core.Component({
|
||||
selector: 'blockly-app',
|
||||
template: `
|
||||
<div *ngIf="getStatusMessage()" aria-hidden="true" class="blocklyAriaLiveStatus">
|
||||
<span aria-live="polite" role="status">{{getStatusMessage()}}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<blockly-toolbox></blockly-toolbox>
|
||||
<blockly-workspace></blockly-workspace>
|
||||
</div>
|
||||
<blockly-block-options-modal></blockly-block-options-modal>
|
||||
|
||||
<label aria-hidden="true" hidden id="blockly-button">{{'BUTTON'|translate}}</label>
|
||||
<label aria-hidden="true" hidden id="blockly-more-options">{{'MORE_OPTIONS'|translate}}</label>
|
||||
<label aria-hidden="true" hidden id="blockly-toolbox-block">{{'TOOLBOX_BLOCK'|translate}}</label>
|
||||
<label aria-hidden="true" hidden id="blockly-workspace-block">{{'WORKSPACE_BLOCK'|translate}}</label>
|
||||
`,
|
||||
directives: [blocklyApp.ToolboxComponent, blocklyApp.WorkspaceComponent],
|
||||
pipes: [blocklyApp.TranslatePipe],
|
||||
// All services are declared here, so that all components in the
|
||||
// application use the same instance of the service.
|
||||
// https://www.sitepoint.com/angular-2-components-providers-classes-factories-values/
|
||||
providers: [
|
||||
blocklyApp.ClipboardService, blocklyApp.NotificationsService,
|
||||
blocklyApp.TreeService, blocklyApp.UtilsService,
|
||||
blocklyApp.AudioService]
|
||||
})
|
||||
.Class({
|
||||
constructor: [blocklyApp.NotificationsService, function(_notificationsService) {
|
||||
<div>
|
||||
<blockly-toolbox></blockly-toolbox>
|
||||
<blockly-workspace></blockly-workspace>
|
||||
</div>
|
||||
|
||||
<label aria-hidden="true" hidden id="blockly-button">{{'BUTTON'|translate}}</label>
|
||||
<label aria-hidden="true" hidden id="blockly-more-options">{{'MORE_OPTIONS'|translate}}</label>
|
||||
<label aria-hidden="true" hidden id="blockly-toolbox-block">{{'TOOLBOX_BLOCK'|translate}}</label>
|
||||
<label aria-hidden="true" hidden id="blockly-workspace-block">{{'WORKSPACE_BLOCK'|translate}}</label>
|
||||
`,
|
||||
directives: [
|
||||
blocklyApp.ToolboxComponent, blocklyApp.WorkspaceComponent,
|
||||
blocklyApp.BlockOptionsModalComponent],
|
||||
pipes: [blocklyApp.TranslatePipe],
|
||||
// All services are declared here, so that all components in the
|
||||
// application use the same instance of the service.
|
||||
// https://www.sitepoint.com/angular-2-components-providers-classes-factories-values/
|
||||
providers: [
|
||||
blocklyApp.ClipboardService, blocklyApp.NotificationsService,
|
||||
blocklyApp.TreeService, blocklyApp.UtilsService,
|
||||
blocklyApp.AudioService, blocklyApp.ModalService,
|
||||
blocklyApp.KeyboardInputService]
|
||||
})
|
||||
.Class({
|
||||
constructor: [
|
||||
blocklyApp.NotificationsService, function(_notificationsService) {
|
||||
this.notificationsService = _notificationsService;
|
||||
}],
|
||||
getStatusMessage: function() {
|
||||
return this.notificationsService.getStatusMessage();
|
||||
}
|
||||
});
|
||||
],
|
||||
getStatusMessage: function() {
|
||||
return this.notificationsService.getStatusMessage();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user