diff --git a/quickdialog/QButtonElement.m b/quickdialog/QButtonElement.m index 2d1aa520..05d450a5 100644 --- a/quickdialog/QButtonElement.m +++ b/quickdialog/QButtonElement.m @@ -44,6 +44,7 @@ - (UITableViewCell *)getCellForTableView:(QuickDialogTableView *)tableView contr cell.textLabel.textAlignment = self.appearance.buttonAlignment; cell.textLabel.font = self.appearance.labelFont; cell.textLabel.textColor = self.enabled ? self.appearance.actionColorEnabled : self.appearance.actionColorDisabled; + cell.accessibilityTraits = UIAccessibilityTraitButton; return cell; } diff --git a/quickdialog/QDateTimeInlineElement.h b/quickdialog/QDateTimeInlineElement.h old mode 100755 new mode 100644 diff --git a/quickdialog/QDateTimeInlineElement.m b/quickdialog/QDateTimeInlineElement.m old mode 100755 new mode 100644 diff --git a/quickdialog/QRadioElement.m b/quickdialog/QRadioElement.m index 1dbfc2fa..2cbd4b88 100644 --- a/quickdialog/QRadioElement.m +++ b/quickdialog/QRadioElement.m @@ -139,6 +139,9 @@ - (UITableViewCell *)getCellForTableView:(QuickDialogTableView *)tableView contr cell.accessoryType = self.enabled ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone; cell.selectionStyle = self.enabled ? UITableViewCellSelectionStyleBlue : UITableViewCellSelectionStyleNone; cell.textField.userInteractionEnabled = NO; + cell.textField.accessibilityElementsHidden = YES; + cell.accessibilityTraits = UIAccessibilityTraitButton; + cell.textLabel.accessibilityLabel = [NSString stringWithFormat: @"%@, %@", cell.textLabel.text, cell.textField.text]; [cell setNeedsLayout]; return cell; } diff --git a/quickdialog/QRadioItemElement.m b/quickdialog/QRadioItemElement.m index 3f66754d..58c5e057 100644 --- a/quickdialog/QRadioItemElement.m +++ b/quickdialog/QRadioItemElement.m @@ -43,6 +43,7 @@ - (UITableViewCell *)getCellForTableView:(QuickDialogTableView *)tableView contr cell.accessoryType = selectedIndex == _index ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone; cell.textLabel.textAlignment = NSTextAlignmentLeft; // hardcoded so that appearance doesn't change it cell.textLabel.textColor = self.enabled ? self.appearance.valueColorEnabled : self.appearance.valueColorDisabled; + cell.accessibilityTraits = UIAccessibilityTraitButton; cell.imageView.image = self.image; return cell; } diff --git a/quickdialog/QuickDialogTableView.h b/quickdialog/QuickDialogTableView.h index 99cb9c68..46d3004d 100644 --- a/quickdialog/QuickDialogTableView.h +++ b/quickdialog/QuickDialogTableView.h @@ -37,6 +37,7 @@ - (QuickDialogTableView *)initWithController:(QuickDialogController *)controller; - (void)deselectRows; +- (NSIndexPath *)indexForElement:(QElement *)element; - (UITableViewCell *)cellForElement:(QElement *)element; - (void)reloadCellForElements:(QElement *)element, ... NS_REQUIRES_NIL_TERMINATION; diff --git a/quickdialog/QuickDialogTableView.m b/quickdialog/QuickDialogTableView.m index 9a66efc8..d60999e7 100644 --- a/quickdialog/QuickDialogTableView.m +++ b/quickdialog/QuickDialogTableView.m @@ -114,7 +114,7 @@ - (UITableViewCell *)cellForElement:(QElement *)element { return nil; UITableViewCell *cell = [self cellForRowAtIndexPath:[element getIndexPath]]; cell.accessibilityLabel = element.accessibilityLabel; - cell.accessibilityIdentifier = cell.accessibilityIdentifier; + cell.accessibilityIdentifier = element.accessibilityIdentifier; return cell; }