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-24415] Android: Fix a11y properties for ListItems #10399

Closed
wants to merge 2 commits into from

Conversation

drauggres
Copy link
Contributor

@build
Copy link
Contributor

build commented Oct 24, 2018

Fails
🚫

🔬 There are library changes, but no changes to the unit tests. That's OK as long as you're refactoring existing code, but will require an admin to merge this PR. Please see README.md#unit-tests for docs on unit testing.

Messages
📖

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

Generated by 🚫 dangerJS

@sgtcoolguy sgtcoolguy added the bug label Oct 29, 2018
@sgtcoolguy sgtcoolguy changed the base branch from next to master November 6, 2018 18:04
@sgtcoolguy sgtcoolguy added this to the 8.0.0 milestone Nov 6, 2018
@drauggres
Copy link
Contributor Author

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 #10397.

@jquick-axway jquick-axway removed this from the 8.0.0 milestone Jan 15, 2019
@drauggres drauggres changed the title [TIMOB-24415] Fix a11y properties for ListItems [TIMOB-24415] Android: Fix a11y properties for ListItems Mar 5, 2019
@build build added this to the 8.1.0 milestone May 13, 2019
@build build requested a review from a team May 13, 2019 11:56
@build
Copy link
Contributor

build commented May 13, 2019

Fails
🚫

🔬 There are library changes, but no changes to the unit tests. That's OK as long as you're refactoring existing code, but will require an admin to merge this PR. Please see README.md#unit-tests for docs on unit testing.

🚫 Tests have failed, see below for more information.
Messages
📖

💾 Here's the generated SDK zipfile.

📖 🎉 Another contribution from our awesome community member, drauggres! Thanks again for helping us make Titanium SDK better. 👍
📖 ❌ 1 tests have failed There are 1 tests failing and 466 skipped out of 3755 total tests.

Tests:

ClassnameNameTimeError
android.emulator.Titanium.UI.TabGroupadd Map.View to TabGroup10.028
Error: timeout of 10000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:4290:23)

Generated by 🚫 dangerJS against 65f4020

Add "accessibilityHint", "accessibilityLabel" and "accessibilityValue" properties to MenuItem
element.
Make 'TiUIView.composeContentDescription' static.

refs TIMOB-26463
- Remove hardcoded content description.
- Add a11y properties to the refresh list.
Need to refresh all a11y properties if any of them are changed, because native "contentDescription"
property is build as their concatenation.

refs TIMOB-24415
@drauggres
Copy link
Contributor Author

var win = Ti.UI.createWindow({backgroundColor: 'white'});

var myTemplate = {
    childTemplates: [
        {                            // Image justified left
            type: 'Ti.UI.ImageView', // Use an image view for the image
            bindId: 'pic',           // Maps to a custom pic property of the item data
            properties: {            // Sets the image view  properties
                width: '50dp', height: '50dp', left: 0
            }
        },
        {                            // Title
            type: 'Ti.UI.Label',     // Use a label for the title
            bindId: 'info',          // Maps to a custom info property of the item data
            properties: {            // Sets the label properties
                color: 'black',
                font: { fontFamily:'Arial', fontSize: '20dp', fontWeight:'bold' },
                left: '60dp', top: 0,
            }
        },
        {                            // Subtitle
            type: 'Ti.UI.Label',     // Use a label for the subtitle
            bindId: 'es_info',       // Maps to a custom es_info property of the item data
            properties: {            // Sets the label properties
                color: 'gray',
                font: { fontFamily:'Arial', fontSize: '14dp' },
                left: '60dp', top: '25dp',
            }
        }
    ]
};

var listView = Ti.UI.createListView({
    templates: { 'template': myTemplate },
    defaultItemTemplate: 'template'
});
var sections = [];

var fruitSection = Ti.UI.createListSection({headerTitle: 'Fruits / Frutas'});
var fruitDataSet = [
    {
        info: {
            text: 'Apple',
            accessibilityLabel: 'AppleLabel,'
        },
        es_info: {
            text: 'Manzana',
            accessibilityHint: 'Manzanahint;'
        },
        pic: {image: 'apple.png',
            accessibilityValue: 'apple.pngVALUE.'}
    },
    {
        info: {text: 'Banana',
            accessibilityLabel: 'BananaLabel,',
            accessibilityValue: 'BananaVALUE.'},
        es_info: {text: 'Banana',
            accessibilityHint: 'Bananahint;',
            accessibilityValue: 'BananaVALUE.'},
        pic: {image: 'banana.png',
            accessibilityLabel: 'banana.pngLabel,',
            accessibilityHint: 'banana.pnghint;'}
    }
];
fruitSection.setItems(fruitDataSet);
sections.push(fruitSection);
listView.setSections(sections);
win.add(listView);
win.open();

timob-24415

@build build requested a review from a team June 3, 2019 17:09
@build build added the docs label Jun 3, 2019
@sgtcoolguy sgtcoolguy modified the milestones: 8.1.0, 8.2.0 Jun 3, 2019
@garymathews
Copy link
Contributor

Closing in favor of #10978

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