Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

drauggres
Copy link
Contributor

JIRA: https://jira.appcelerator.org/browse/TIMOB-26463

Add accessibilityHint, accessibilityLabel and accessibilityValue properties to MenuItem.

@sgtcoolguy sgtcoolguy added this to the 8.0.0 milestone Nov 6, 2018
@sgtcoolguy sgtcoolguy changed the base branch from next to master November 6, 2018 18:03
@mukherjee2 mukherjee2 modified the milestones: 8.0.0, 8.1.0 Jan 16, 2019
@drauggres drauggres changed the base branch from master to 7_5_X March 5, 2019 14:56
@drauggres drauggres changed the base branch from 7_5_X to master March 5, 2019 14:56
@build build requested review from a team March 5, 2019 15:39
@drauggres
Copy link
Contributor Author

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
@drauggres
Copy link
Contributor Author

  • rebased on master
  • fixed since version in documentation
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();
});

timob-26463

@build
Copy link
Contributor

build commented Jun 3, 2019

Messages
📖

💾 Here's the generated SDK zipfile.

📖 🎉 Another contribution from our awesome community member, drauggres! Thanks again for helping us make Titanium SDK better. 👍
📖

✅ All tests are passing
Nice one! All 3701 tests are passing.
(There are 470 tests skipped)

📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.

Generated by 🚫 dangerJS against f4a5ea0

@sgtcoolguy sgtcoolguy modified the milestones: 8.1.0, 8.2.0 Jun 3, 2019
@drauggres
Copy link
Contributor Author

This should be rewritten In accordance with #10978

@tidev tidev deleted a comment from build Jul 8, 2019
@sgtcoolguy
Copy link
Contributor

cc @garymathews What do we need to do to get this PR updated and merged?

@sgtcoolguy sgtcoolguy modified the milestones: 8.2.0, 8.3.0 Jul 31, 2019
@garymathews
Copy link
Contributor

Closing, succeeded by #10978

@drauggres
Copy link
Contributor Author

Closing, succeeded by #10978

I think there was some kind of mistake.
#10978 does not provide support for a11y properties in MenuItem.
And its predecessor (#10399) was already closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants