Merge pull request #3721 from capilkey/1.1-accessibility-fixes-2
More accessibility fixes for 1.1
This commit is contained in:
commit
cd52836689
@ -292,6 +292,7 @@ bbb.screensharePublish.restart.tooltip = Resume screen share
|
||||
bbb.screensharePublish.restart.label = Resume
|
||||
bbb.screensharePublish.maximizeRestoreBtn.toolTip = You cannot maximize this window.
|
||||
bbb.screensharePublish.closeBtn.toolTip = Stop Sharing and Close
|
||||
bbb.screensharePublish.closeBtn.accessibilityName = Stop Sharing and Close Screen Sharing Publish Window
|
||||
bbb.screensharePublish.minimizeBtn.toolTip = Minimize
|
||||
bbb.screensharePublish.minimizeBtn.accessibilityName = Minimize the Screen Sharing Publish Window
|
||||
bbb.screensharePublish.maximizeRestoreBtn.accessibilityName = Maximize the Screen Sharing Publish Window
|
||||
@ -448,6 +449,8 @@ bbb.caption.transcript.noowner = None
|
||||
bbb.caption.transcript.youowner = You
|
||||
bbb.caption.transcript.pastewarning.title = Caption Paste Warning
|
||||
bbb.caption.transcript.pastewarning.text = Cannot paste text longer than {0} characters. You pasted {1} characters.
|
||||
bbb.caption.transcript.inputArea.toolTip = Caption Input Area
|
||||
bbb.caption.transcript.outputArea.toolTip = Caption Output Area
|
||||
bbb.caption.option.label = Options
|
||||
bbb.caption.option.language = Language:
|
||||
bbb.caption.option.language.tooltip = Select Caption Language
|
||||
|
@ -64,6 +64,28 @@ function determineGlobalModifier()
|
||||
return modifier;
|
||||
}
|
||||
|
||||
function determineGlobalAlternateModifier()
|
||||
{
|
||||
var browser = determineBrowser()[0];
|
||||
var modifier;
|
||||
if (browser == "Firefox"){
|
||||
modifier = "control+";
|
||||
}
|
||||
else if (browser == "Chrome"){
|
||||
modifier = "control+";
|
||||
}
|
||||
else if (browser == "Microsoft Internet Explorer"){
|
||||
modifier = "control+shift+";
|
||||
}
|
||||
//else if (browser == "Safari"){
|
||||
// modifier = "control+alt";
|
||||
//}
|
||||
else{
|
||||
modifier = "control+shift";
|
||||
}
|
||||
return modifier;
|
||||
}
|
||||
|
||||
function determineBrowser()
|
||||
{
|
||||
// Browser name extraction code provided by http://www.javascripter.net/faq/browsern.htm
|
||||
|
@ -80,10 +80,12 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
private var modifier:String;
|
||||
private var globalModifier:String;
|
||||
private var globalAlternateModifier:String;
|
||||
|
||||
private function init():void {
|
||||
modifier = ExternalInterface.call("determineModifier");
|
||||
globalModifier = ExternalInterface.call("determineGlobalModifier");
|
||||
globalAlternateModifier = ExternalInterface.call("determineGlobalAlternateModifier");
|
||||
|
||||
ShortcutOptions.initialize();
|
||||
|
||||
@ -194,8 +196,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|| convKey == ResourceUtil.getInstance().getString('bbb.shortcutkey.specialKeys.right')
|
||||
|| convKey == ResourceUtil.getInstance().getString('bbb.shortcutkey.specialKeys.down')){
|
||||
keyList.addItem({shortcut:convKey, func:(ResourceUtil.getInstance().getString(resource[i] + '.function'))});
|
||||
}
|
||||
else{
|
||||
} else if (convKey == ResourceUtil.getInstance().getString('bbb.shortcutkey.specialKeys.minus')
|
||||
|| convKey == ResourceUtil.getInstance().getString('bbb.shortcutkey.specialKeys.plus')) {
|
||||
keyList.addItem({shortcut:globalAlternateModifier + convKey, func:(ResourceUtil.getInstance().getString(resource[i] + '.function'))});
|
||||
} else{
|
||||
keyList.addItem({shortcut:mod + convKey, func:(ResourceUtil.getInstance().getString(resource[i] + '.function'))});
|
||||
}
|
||||
}
|
||||
|
11
bigbluebutton-client/src/org/bigbluebutton/modules/caption/views/CaptionWindow.mxml
Normal file → Executable file
11
bigbluebutton-client/src/org/bigbluebutton/modules/caption/views/CaptionWindow.mxml
Normal file → Executable file
@ -160,10 +160,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
addTextTab();
|
||||
}
|
||||
|
||||
var tab:Button = captionTabs.getTabAt(0);
|
||||
if (tab != null) {
|
||||
tab.setStyle("fillColors", new Array(0xFFAE00, 0xD3800A));
|
||||
}
|
||||
captionTabs.selectedIndex = 0;
|
||||
|
||||
// When the tab is switched we want to autofocus to the area that we likely want to immediately interact with,
|
||||
// but if we move focus immediately the tab's contents aren't actually visible on the screen. This results in
|
||||
// a screen reader not recognizing the focus shift. We need to delay the focus change for a couple of frames,
|
||||
// but there isn't a good event to listen for so a short Timer was used instead.
|
||||
textTab.delayedFocusTextArea();
|
||||
}
|
||||
|
||||
private function onTranscriptOwnerIDChange(o:Object):void {
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
package org.bigbluebutton.modules.caption.views {
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
import com.asfusion.mate.events.Listener;
|
||||
|
||||
import flash.events.Event;
|
||||
import flash.events.KeyboardEvent;
|
||||
@ -36,6 +37,7 @@ package org.bigbluebutton.modules.caption.views {
|
||||
import mx.controls.Button;
|
||||
import mx.events.FlexEvent;
|
||||
|
||||
import org.bigbluebutton.common.events.LocaleChangeEvent;
|
||||
import org.bigbluebutton.core.managers.UserManager;
|
||||
import org.bigbluebutton.modules.caption.events.SendEditCaptionHistoryEvent;
|
||||
import org.bigbluebutton.modules.caption.events.SendUpdateCaptionOwnerEvent;
|
||||
@ -74,6 +76,8 @@ package org.bigbluebutton.modules.caption.views {
|
||||
private var outputArea:TextArea2;
|
||||
private var claimButton:Button;
|
||||
|
||||
private var focusSwitchTimer:Timer;
|
||||
|
||||
public function TextTab(startIndex:int, captionOptions:CaptionOptions) {
|
||||
super();
|
||||
|
||||
@ -98,8 +102,6 @@ package org.bigbluebutton.modules.caption.views {
|
||||
addChild(outputArea);
|
||||
|
||||
claimButton = new Button();
|
||||
claimButton.label = ResourceUtil.getInstance().getString('bbb.caption.option.takeowner');
|
||||
claimButton.toolTip = ResourceUtil.getInstance().getString('bbb.caption.option.takeowner.tooltip');
|
||||
claimButton.height = 22;
|
||||
claimButton.visible = false;
|
||||
claimButton.includeInLayout = false;
|
||||
@ -111,6 +113,12 @@ package org.bigbluebutton.modules.caption.views {
|
||||
_sendTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onSendTimerComplete);
|
||||
|
||||
addEventListener(FlexEvent.CREATION_COMPLETE, onCreationComplete);
|
||||
|
||||
var localeListener:Listener = new Listener();
|
||||
localeListener.type = LocaleChangeEvent.LOCALE_CHANGED;
|
||||
localeListener.method = localeChanged;
|
||||
|
||||
resourcesChanged();
|
||||
}
|
||||
|
||||
private function onCreationComplete(e:FlexEvent):void {
|
||||
@ -120,6 +128,40 @@ package org.bigbluebutton.modules.caption.views {
|
||||
removeEventListener(FlexEvent.CREATION_COMPLETE, onCreationComplete);
|
||||
}
|
||||
|
||||
private function localeChanged(e:Event):void{
|
||||
resourcesChanged();
|
||||
}
|
||||
|
||||
override protected function resourcesChanged():void{
|
||||
super.resourcesChanged();
|
||||
|
||||
if (inputArea != null) {
|
||||
inputArea.toolTip = ResourceUtil.getInstance().getString('bbb.caption.transcript.inputArea.toolTip');
|
||||
}
|
||||
|
||||
if (outputArea != null) {
|
||||
outputArea.toolTip = ResourceUtil.getInstance().getString('bbb.caption.transcript.outputArea.toolTip');
|
||||
}
|
||||
|
||||
if (claimButton != null) {
|
||||
claimButton.label = ResourceUtil.getInstance().getString('bbb.caption.option.takeowner');
|
||||
claimButton.toolTip = ResourceUtil.getInstance().getString('bbb.caption.option.takeowner.tooltip');
|
||||
}
|
||||
}
|
||||
|
||||
public function delayedFocusTextArea():void {
|
||||
focusSwitchTimer = new Timer(250, 1);
|
||||
focusSwitchTimer.addEventListener(TimerEvent.TIMER, function():void {
|
||||
focusTextArea();
|
||||
});
|
||||
focusSwitchTimer.start();
|
||||
}
|
||||
|
||||
public function focusTextArea():void {
|
||||
var areaToFocus:TextArea2 = (inputArea.visible ? inputArea : outputArea);
|
||||
areaToFocus.setFocus();
|
||||
}
|
||||
|
||||
public function setCurrentTranscript(t:Transcript):void {
|
||||
if (transcriptChangeWatcher != null && transcriptChangeWatcher.isWatching()) {
|
||||
transcriptChangeWatcher.unwatch();
|
||||
@ -134,9 +176,16 @@ package org.bigbluebutton.modules.caption.views {
|
||||
}
|
||||
|
||||
public function transcriptOwnerIDChange(ownerID:String):void {
|
||||
//check focus targets before switching visibility
|
||||
var focusedTextArea:TextArea2 = null;
|
||||
|
||||
if (ownerID == UserManager.getInstance().getConference().getMyUserId()) {
|
||||
claimButton.visible = claimButton.includeInLayout = false;
|
||||
|
||||
if (focusManager && focusManager.getFocus() == outputArea) {
|
||||
delayedFocusTextArea();
|
||||
}
|
||||
|
||||
//release text
|
||||
inputArea.visible = inputArea.includeInLayout = true;
|
||||
outputArea.visible = outputArea.includeInLayout = false;
|
||||
@ -145,18 +194,15 @@ package org.bigbluebutton.modules.caption.views {
|
||||
} else {
|
||||
claimButton.visible = claimButton.includeInLayout = UserManager.getInstance().getConference().amIModerator();
|
||||
|
||||
if (ownerID == "") {
|
||||
//unclaimed text
|
||||
inputArea.visible = inputArea.includeInLayout = false;
|
||||
outputArea.visible = outputArea.includeInLayout = true;
|
||||
inputArea.getInternalTextField().type = TextFieldType.DYNAMIC;
|
||||
} else {
|
||||
//claimed by other
|
||||
inputArea.visible = inputArea.includeInLayout = false;
|
||||
outputArea.visible = outputArea.includeInLayout = true;
|
||||
inputArea.getInternalTextField().type = TextFieldType.DYNAMIC;
|
||||
if (focusManager && focusManager.getFocus() == outputArea) {
|
||||
delayedFocusTextArea();
|
||||
}
|
||||
|
||||
//unclaimed text
|
||||
inputArea.visible = inputArea.includeInLayout = false;
|
||||
outputArea.visible = outputArea.includeInLayout = true;
|
||||
inputArea.getInternalTextField().type = TextFieldType.DYNAMIC;
|
||||
|
||||
resetOverwriteVars();
|
||||
resetTextToSendVars();
|
||||
}
|
||||
@ -189,6 +235,8 @@ package org.bigbluebutton.modules.caption.views {
|
||||
|
||||
private function onClaimButtonClick(e:MouseEvent):void {
|
||||
claimTranscript(currentTranscript.locale, currentTranscript.localeCode, true);
|
||||
|
||||
delayedFocusTextArea();
|
||||
}
|
||||
|
||||
private function claimTranscript(locale:String, localeCode:String, claim:Boolean):void {
|
||||
|
@ -38,6 +38,10 @@ package org.bigbluebutton.modules.chat.views
|
||||
super();
|
||||
}
|
||||
|
||||
override protected function drawHighlightIndicator(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void {
|
||||
//intentionally empty to not show on hover
|
||||
}
|
||||
|
||||
override protected function measure():void
|
||||
{
|
||||
super.measure();
|
||||
|
@ -133,6 +133,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
windowControls.maximizeRestoreBtn.enabled = false;
|
||||
|
||||
titleBarOverlay.tabIndex = dsOptions.baseTabIndex;
|
||||
titleBarOverlay.focusEnabled = true;
|
||||
|
||||
resourcesChanged();
|
||||
@ -529,8 +530,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
private function switchView(showHelp:Boolean):void {
|
||||
helpInfoBox.visible = helpInfoBox.includeInLayout = showHelp;
|
||||
previewBox.visible = !showHelp;
|
||||
|
||||
titleBarOverlay.tabIndex = dsOptions.baseTabIndex;
|
||||
|
||||
shareTypeBox.visible = showHelp;
|
||||
cancelBtn.visible = cancelBtn.includeInLayout = showHelp;
|
||||
@ -555,8 +554,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
styleName="micSettingsWindowHelpButtonStyle"
|
||||
right="0"
|
||||
click="onHelpButtonClicked()"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.screensharePublish.helpbutton.toolTip')}"
|
||||
accessibilityName="{ResourceUtil.getInstance().getString('bbb.screensharePublish.helpbutton.accessibilityName')}"/>
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.screensharePublish.helpButton.toolTip')}"
|
||||
accessibilityName="{ResourceUtil.getInstance().getString('bbb.screensharePublish.helpButton.accessibilityName')}"/>
|
||||
</mx:HBox>
|
||||
<mx:HBox id="helpBox" width="100%" horizontalAlign="center">
|
||||
<mx:VBox width="30%" horizontalAlign="center">
|
||||
|
Loading…
Reference in New Issue
Block a user