Skip to content

Commit 58a97da

Browse files
authored
Merge pull request #18491 from wordpress-mobile/feature/18176-accessibility
Blogging Prompts Feature Introduction: VoiceOver improvements
2 parents 92a975f + 066ef0d commit 58a97da

3 files changed

Lines changed: 25 additions & 6 deletions

File tree

WordPress/Classes/ViewRelated/Feature Introduction/Blogging Prompts/BloggingPromptsFeatureDescriptionView.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class BloggingPromptsFeatureDescriptionView: UIView, NibLoadable {
77
@IBOutlet private weak var promptCardView: UIView!
88
@IBOutlet private weak var descriptionLabel: UILabel!
99
@IBOutlet private weak var noteTextView: UITextView!
10+
@IBOutlet private weak var noteAccessibilityLabel: UILabel!
1011

1112
// MARK: - Init
1213

@@ -37,6 +38,7 @@ private extension BloggingPromptsFeatureDescriptionView {
3738
promptCard.cardFrameView.layer.shadowOpacity = Style.cardShadowOpacity
3839
promptCard.cardFrameView.layer.shadowRadius = Style.cardShadowRadius
3940

41+
promptCardView.accessibilityElementsHidden = true
4042
promptCardView.addSubview(promptCard.cardFrameView)
4143
promptCardView.pinSubviewToAllEdges(promptCard.cardFrameView)
4244
}
@@ -70,12 +72,16 @@ private extension BloggingPromptsFeatureDescriptionView {
7072
.font: UIFont.preferredFont(forTextStyle: .caption1)]))
7173

7274
noteTextView.attributedText = attributedString
75+
76+
noteTextView.accessibilityElementsHidden = true
77+
noteAccessibilityLabel.accessibilityLabel = Strings.noteTextAccessibilityLabel
7378
}
7479

7580
enum Strings {
7681
static let featureDescription: String = NSLocalizedString("We’ll show you a new prompt each day on your dashboard to help get those creative juices flowing!", comment: "Description of Blogging Prompts displayed in the Feature Introduction view.")
7782
static let noteLabel: String = NSLocalizedString("Note:", comment: "Label for the note displayed in the Feature Introduction view.")
7883
static let noteText: String = NSLocalizedString("You can learn more and set up reminders at any time in My Site > Settings > Blogging Reminders.", comment: "Note displayed in the Feature Introduction view.")
84+
static let noteTextAccessibilityLabel: String = NSLocalizedString("You can learn more and set up reminders at any time in My Site, Settings, Blogging Reminders.", comment: "Accessibility hint for Note displayed in the Feature Introduction view.")
7985
}
8086

8187
enum Style {

WordPress/Classes/ViewRelated/Feature Introduction/Blogging Prompts/BloggingPromptsFeatureDescriptionView.xib

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8JU-nl-SWR" userLabel="Prompt Card">
1919
<rect key="frame" x="52" y="0.0" width="310.5" height="200.5"/>
2020
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
21+
<accessibility key="accessibilityConfiguration">
22+
<accessibilityTraits key="traits" notEnabled="YES"/>
23+
</accessibility>
2124
<constraints>
2225
<constraint firstAttribute="height" relation="greaterThanOrEqual" id="BfW-eb-ZtV"/>
2326
</constraints>
@@ -31,28 +34,44 @@
3134
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" editable="NO" text="Note: You can learn more and set up reminders at any time in My Site &gt; Settings &gt; Blogging Reminders." textAlignment="natural" adjustsFontForContentSizeCategory="YES" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z9E-X2-t3c" userLabel="Note">
3235
<rect key="frame" x="16" y="284.5" width="382" height="42.5"/>
3336
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
37+
<accessibility key="accessibilityConfiguration">
38+
<accessibilityTraits key="traits" notEnabled="YES"/>
39+
<bool key="isElement" value="NO"/>
40+
</accessibility>
3441
<color key="textColor" systemColor="secondaryLabelColor"/>
3542
<fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
3643
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
3744
</textView>
45+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ART-X9-BCw" userLabel="Note Accessibility Label">
46+
<rect key="frame" x="16" y="284.5" width="382" height="42.5"/>
47+
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
48+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
49+
<nil key="textColor"/>
50+
<nil key="highlightedColor"/>
51+
</label>
3852
</subviews>
3953
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
4054
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
4155
<constraints>
4256
<constraint firstItem="z9E-X2-t3c" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="16" id="1K2-WJ-vdn"/>
4357
<constraint firstItem="8JU-nl-SWR" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" multiplier="0.75" id="4C5-B7-SUy"/>
58+
<constraint firstItem="ART-X9-BCw" firstAttribute="leading" secondItem="z9E-X2-t3c" secondAttribute="leading" id="8Qb-0Z-rT5"/>
4459
<constraint firstItem="8JU-nl-SWR" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="95d-85-VYs"/>
4560
<constraint firstAttribute="bottom" secondItem="z9E-X2-t3c" secondAttribute="bottom" id="IUZ-vA-5QN"/>
4661
<constraint firstItem="1gW-xt-yLe" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="16" id="WJ4-xD-ctR"/>
62+
<constraint firstItem="ART-X9-BCw" firstAttribute="trailing" secondItem="z9E-X2-t3c" secondAttribute="trailing" id="lKl-p8-5Ty"/>
4763
<constraint firstItem="8JU-nl-SWR" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="sjz-gT-pc8"/>
4864
<constraint firstAttribute="trailing" secondItem="1gW-xt-yLe" secondAttribute="trailing" constant="16" id="srn-mJ-gKe"/>
4965
<constraint firstAttribute="trailing" secondItem="z9E-X2-t3c" secondAttribute="trailing" constant="16" id="vmH-4q-pbI"/>
66+
<constraint firstItem="ART-X9-BCw" firstAttribute="bottom" secondItem="z9E-X2-t3c" secondAttribute="bottom" id="wAs-7B-QAX"/>
5067
<constraint firstItem="z9E-X2-t3c" firstAttribute="top" secondItem="1gW-xt-yLe" secondAttribute="bottom" constant="24" id="wED-RV-9Lf"/>
68+
<constraint firstItem="ART-X9-BCw" firstAttribute="top" secondItem="z9E-X2-t3c" secondAttribute="top" id="xiL-2a-FCO"/>
5169
<constraint firstItem="1gW-xt-yLe" firstAttribute="top" secondItem="8JU-nl-SWR" secondAttribute="bottom" constant="24" id="yAr-WH-wmx"/>
5270
</constraints>
5371
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
5472
<connections>
5573
<outlet property="descriptionLabel" destination="1gW-xt-yLe" id="rot-qA-zIV"/>
74+
<outlet property="noteAccessibilityLabel" destination="ART-X9-BCw" id="cbu-ST-2Qk"/>
5675
<outlet property="noteTextView" destination="z9E-X2-t3c" id="GcN-mv-lZH"/>
5776
<outlet property="promptCardView" destination="8JU-nl-SWR" id="tY3-0q-Bn3"/>
5877
</connections>

WordPress/Classes/ViewRelated/Gutenberg/Collapsable Header/CollapsableHeaderViewController.xib

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@
7979
</imageView>
8080
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" text="Choose a Layout" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" adjustsLetterSpacingToFitWidth="YES" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nio-Wp-Ebw" userLabel="Large Title">
8181
<rect key="frame" x="79" y="48" width="224" height="37"/>
82-
<accessibility key="accessibilityConfiguration">
83-
<accessibilityTraits key="traits" staticText="YES" notEnabled="YES"/>
84-
</accessibility>
8582
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle0"/>
8683
<nil key="textColor"/>
8784
<nil key="highlightedColor"/>
@@ -91,9 +88,6 @@
9188
</stackView>
9289
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" text="Get started by choosing from a wide variety of pre-made page layouts. Or just start with a blank page." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" adjustsLetterSpacingToFitWidth="YES" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bxz-wi-I73" userLabel="Prompt">
9390
<rect key="frame" x="16" y="107" width="382" height="36"/>
94-
<accessibility key="accessibilityConfiguration">
95-
<accessibilityTraits key="traits" staticText="YES" notEnabled="YES"/>
96-
</accessibility>
9791
<constraints>
9892
<constraint firstAttribute="width" priority="750" constant="600" id="Wga-Tr-jFk"/>
9993
</constraints>

0 commit comments

Comments
 (0)