我在开发过程中使用VoiceOver测试可访问性更改。
很多时候,VoiceOver会正确检测到更改,开始阅读它们,但会被新信息中断。因此,当其他更改出现时,重要的信息基本上会被取消。
在我的情况下,我有一个非常重要的警报,但祖先的变化似乎得到了阅读。
如果我能看到VoiceOver说的所有内容的日志,我至少可以确信文本正在被读取并找出一种方法来缓解问题(可能通过延迟)
无论如何都要获得画外音日志?
答案 0 :(得分:1)
我不相信有任何方法可以打印日志,但您可以按public class Perspective implements IPerspectiveFactory {
String ID = "bddperspective";
@Override
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, .15f, editorArea);
right.addView(DiagramView.ID);
IViewLayout viewLayout = layout.getViewLayout(DiagramView.ID);
if (viewLayout != null) {
viewLayout.setCloseable(false);
viewLayout.setMoveable(false);
}
layout.setEditorAreaVisible(true);
layout.setFixed(true);
try {
new CallBDDEditor().execute(null);
} catch (ExecutionException e) {
e.printStackTrace();
}
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPage page = window.getActivePage();
IPerspectiveRegistry perspectiveRegistry = window.getWorkbench().getPerspectiveRegistry();
IPerspectiveDescriptor personalPerspectiveDescriptor = perspectiveRegistry.findPerspectiveWithId(ID);
if (page != null && personalPerspectiveDescriptor != null) {
page.savePerspectiveAs(personalPerspectiveDescriptor);
}
}}
public class CallBDDEditor extends AbstractHandler {
public static final String ID = "bdd.klighd.openBDDEditor";
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPage page = window.getActivePage();
try {
page.openEditor(new BDDEditorInput("test of editor input"), BDDEditor.ID);
} catch (PartInitException e) {
e.printStackTrace();
}
return null;
}
@Override
public boolean isEnabled() {
return false;
}
@Override
public boolean isHandled() {
return false;
}
@Override
public void removeHandlerListener(IHandlerListener handlerListener) {
}}
public class BDDEditor extends EditorPart {
public static final String ID = "bdd.klighd.BDDEditor";
boolean dirty = false;
private String formula_ = "f(x,y,z) = x!y + z!x";
ToolItem inputItem_;
ToolItem showItem_;
ToolItem simplifyItem_;
ToolItem removeItem_;
ToolItem cancelItem_;
Composite parent_;
ToolBar bar_;
private Label formulaLbl_;
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.setSite(site);
super.setInput(input);
}
@Override
public boolean isDirty() {
return false;
}
@Override
public void createPartControl(Composite parent) {
parent_ = parent;
GridLayout layout = new GridLayout();
layout.numColumns = 1;
parent_.setLayout(layout);
formulaLbl_ = new Label(parent_, SWT.NONE);
formulaLbl_.setText("");
bar_ = new ToolBar(parent_, SWT.BORDER | SWT.VERTICAL);
// create items
inputItem_ = new ToolItem(bar_, 0);
showItem_ = new ToolItem(bar_, SWT.PUSH);
simplifyItem_ = new ToolItem(bar_, SWT.PUSH);
removeItem_ = new ToolItem(bar_, SWT.PUSH);
cancelItem_ = new ToolItem(bar_, 0);
// set text on items
inputItem_.setText("INPUT");
showItem_.setText("SHOW");
simplifyItem_.setText("SIMPLIFY");
removeItem_.setText("REMOVE");
cancelItem_.setText("CANCEL");
// disable show-, simplify-, remove- and cancelItems
showItem_.setEnabled(false);
simplifyItem_.setEnabled(false);
removeItem_.setEnabled(false);
cancelItem_.setEnabled(false);
DropdownSelectionListener listenerInput = new DropdownSelectionListener(inputItem_);
listenerInput.add("As String", true);
listenerInput.add("From File", false);
inputItem_.addSelectionListener(listenerInput);
bar_.pack();
parent_.pack();
}
public IEditorInput getEditorInput() {
return super.getEditorInput();
}
@Override
public void doSave(IProgressMonitor monitor) {
}
@Override
public boolean isSaveAsAllowed() {
return true;
}
@Override
public void setFocus() {
}
@Override
public void dispose() {
super.dispose();
}
@Override
public void doSaveAs() {
}}
将输出保存到音频文件中。如果音频运行得太快,您可以尝试减慢速度或使用某些命令重复输出。此处列出的某些命令可能会有所帮助:
http://lab.dotjay.co.uk/notes/voiceover-commands/