Jwoo/ios a11y date picker (#7555)
* updated a11y lables * clang format upudate
This commit is contained in:
Родитель
70e6719fd0
Коммит
b07379e51e
|
@ -69,9 +69,8 @@ using namespace AdaptiveCards;
|
|||
self.isRequired = _validator.isRequired;
|
||||
self.hasValidationProperties = self.isRequired;
|
||||
auto inputLabel = choiceSet->GetLabel();
|
||||
if (!inputLabel.empty()) {
|
||||
_inputLabel = [NSString stringWithCString:inputLabel.c_str() encoding:NSUTF8StringEncoding];
|
||||
}
|
||||
_inputLabel = (!inputLabel.empty()) ? [NSString stringWithCString:inputLabel.c_str() encoding:NSUTF8StringEncoding] : @"";
|
||||
|
||||
|
||||
// configure UI
|
||||
_listView = [[UITableView alloc] init];
|
||||
|
@ -345,6 +344,7 @@ using namespace AdaptiveCards;
|
|||
cell.textLabel.text = [_filteredDataSource getItemAt:indexPath.row];
|
||||
cell.textLabel.numberOfLines = _wrapLines;
|
||||
cell.accessibilityLabel = [NSString stringWithFormat:@"%@, %@", _inputLabel, cell.textLabel.text];
|
||||
cell.accessibilityValue = [NSString stringWithFormat:@"%ld of %ld", indexPath.row + 1, [self tableView:tableView numberOfRowsInSection:0]];
|
||||
cell.accessibilityIdentifier = [NSString stringWithFormat:@"%@, %@", self.id, cell.textLabel.text];
|
||||
cell.accessibilityTraits = UIAccessibilityTraitButton;
|
||||
return cell;
|
||||
|
|
|
@ -172,11 +172,12 @@ const CGFloat padding = 2.0f;
|
|||
cell.textLabel.lineBreakMode = NSLineBreakByTruncatingTail;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
if (!_accessibilityString) {
|
||||
_accessibilityString = tableView.accessibilityLabel;
|
||||
_accessibilityString = tableView.accessibilityLabel ? tableView.accessibilityLabel : @"";
|
||||
tableView.accessibilityLabel = nil;
|
||||
}
|
||||
cell.accessibilityTraits = cell.accessibilityTraits | UIAccessibilityTraitButton;
|
||||
cell.accessibilityLabel = [NSString stringWithFormat:@"%@, %@", _accessibilityString, title];
|
||||
cell.accessibilityTraits = cell.accessibilityTraits;
|
||||
cell.accessibilityLabel = [NSString stringWithFormat:@"%@, %@, %@", _accessibilityString, title, _isMultiChoicesAllowed ? @"check box" : @"radio button"];
|
||||
cell.accessibilityHint = NSLocalizedString(@"double tap to select", nil);
|
||||
|
||||
NSString *elementId = [NSString stringWithCString:_choiceSetDataSource->GetId().c_str()
|
||||
encoding:NSUTF8StringEncoding];
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
ACRInputLabelView *inputLabelView = [[ACRInputLabelView alloc] initInputLabelView:rootView acoConfig:acoConfig adptiveInputElement:dateInput inputView:dateField accessibilityItem:dateField.inputView viewGroup:viewGroup dataSource:nil];
|
||||
dateField.accessibilityTraits = UIAccessibilityTraitButton | UIAccessibilityTraitStaticText;
|
||||
dateField.accessibilityHint = NSLocalizedString(@"opens the date picker", nil);
|
||||
|
||||
[viewGroup addArrangedSubview:inputLabelView];
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
|
||||
ACRInputLabelView *inputLabelView = [[ACRInputLabelView alloc] initInputLabelView:rootView acoConfig:acoConfig adptiveInputElement:timeInput inputView:field accessibilityItem:field.inputView viewGroup:viewGroup dataSource:nil];
|
||||
field.accessibilityTraits = UIAccessibilityTraitButton | UIAccessibilityTraitStaticText;
|
||||
field.accessibilityHint = NSLocalizedString(@"opens the time picker", nil);
|
||||
|
||||
UIView *renderedview = inputLabelView;
|
||||
|
||||
if (viewGroup) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче