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

fix(android): set ListItem properties into proxy properties #10978

Merged
merged 4 commits into from Jul 8, 2019

Conversation

garymathews
Copy link
Contributor

  • Set ListItem properties on components
  • Move composeContentDescription() in appropriate place
TEST CASE
  • Enable Text-to-Speech
  • Select each item to confirm accessibilityHint has been set
const win = Ti.UI.createWindow({
    backgroundColor: 'white'
});
const listView = Ti.UI.createListView({
    templates: {
        template: {
            childTemplates: [{
                    type: 'Ti.UI.Label',
                    bindId: 'info',
                    properties: {
                        color: 'black',
                        font: {
                            fontFamily: 'Arial',
                            fontSize: '20dp',
                            fontWeight: 'bold'
                        },
                        left: '60dp',
                        top: 0
                    }
                },
                {
                    type: 'Ti.UI.Label',
                    bindId: 'es_info',
                    properties: {
                        color: 'gray',
                        font: {
                            fontFamily: 'Arial',
                            fontSize: '14dp'
                        },
                        left: '60dp',
                        top: '25dp'
                    }
                }
            ]
        }
    },
    defaultItemTemplate: 'template'
});

listView.setSections([
    Ti.UI.createListSection({
        headerTitle: 'Fruits / Frutas',
        items: [{
                info: {
                    text: 'Apple',
                    accessibilityLabel: 'Apple Label'
                },
                es_info: {
                    text: 'Manzana',
                    accessibilityHint: 'Manzana Hint'
                }
            },
            {
                info: {
                    text: 'Banana',
                    accessibilityLabel: 'Banana Label',
                    accessibilityValue: 'Banana Value'
                },
                es_info: {
                    text: 'Banana',
                    accessibilityHint: 'Banana Hint',
                    accessibilityValue: 'Banana Value'
                }
            }
        ]
    })
]);

win.add(listView);
win.open();

JIRA Ticket

@build
Copy link
Contributor

build commented Jun 18, 2019

Messages
📖 👍 Hey!, You deleted more code than you added. That's awesome!
📖

💾 Here's the generated SDK zipfile.

📖

✅ 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 962fb66

@drauggres
Copy link
Contributor

@drauggres
Copy link
Contributor

Copy link
Contributor

@sgtcoolguy sgtcoolguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, See backport for additional comments about minor code clean up.

@lokeshchdhry
Copy link
Contributor

lokeshchdhry commented Jul 8, 2019

FR Passed.

Accessibility label in the ListItem components. Enabling text to speech speaks out the accessibility label & value as expected.

Studio Ver: 5.1.3.201906102126
SDK Ver: 8.2.0 local build
OS Ver: 10.14.5
Xcode Ver: Xcode 10.2.1
Appc NPM: 4.2.14-3
Appc CLI: 7.1.0-master.24
Daemon Ver: 1.1.3
Ti CLI Ver: 5.2.1
Alloy Ver: 1.14.0
Node Ver: 8.15.1
NPM Ver: 6.4.1
Java Ver: 10.0.2
Devices: ⇨ google Pixel (Android 9)

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

7 participants