-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-26463] Android: Add accessibility properties to MenuItem #10397
Conversation
Confilcts resolved. Commits squashed and rebased on master. About "needs tests" label: we can't create unit tests to check this feature. For proper testing we need UI tests (and smth. like appium). Same for #10399. |
Add "accessibilityHint", "accessibilityLabel" and "accessibilityValue" properties to MenuItem element. Make 'TiUIView.composeContentDescription' static. refs TIMOB-26463
var tabGroup = Ti.UI.createTabGroup();
tabGroup.addTab(createTab("Tab 1", "I am Window 1", "assets/images/tab1.png"));
tabGroup.addTab(createTab("Tab 2", "I am Window 2", "assets/images/tab2.png"));
tabGroup.open();
function createTab(title, message, icon) {
var win = Ti.UI.createWindow({
title: title,
backgroundColor: '#fff'
});
var label = Ti.UI.createLabel({
text: message,
color: "#333",
font: {
fontSize: 20
}
});
win.add(label);
return Ti.UI.createTab({
title: title,
icon: icon,
window: win
});
}
tabGroup.addEventListener("open", function() {
var activity = this.getActivity();
activity.onCreateOptionsMenu = function(e) {
var menuItem = e.menu.add({
title : "Add Task",
accessibilityHint: 'Hint.',
accessibilityLabel: 'label,',
accessibilityValue: 'VALUE;',
showAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS,
icon : "add_icon.png"
});
menuItem.addEventListener("click", function(e) {
//
});
};
activity.invalidateOptionsMenu();
}); |
|
This should be rewritten In accordance with #10978 |
cc @garymathews What do we need to do to get this PR updated and merged? |
Closing, succeeded by #10978 |
JIRA: https://jira.appcelerator.org/browse/TIMOB-26463
Add accessibilityHint, accessibilityLabel and accessibilityValue properties to MenuItem.