Add correct focus behavior for the modal. Update boundary sounds.

This commit is contained in:
Sean Lip
2016-11-14 18:31:36 -08:00
parent 14f0a1cd3d
commit b1109f47f0
20 changed files with 1919 additions and 1624 deletions

View File

@@ -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();
}
});