Commit 7001577e67
Unsigned
Layout: unified · split
DomainDigUITests/AccessibilityAuditHarness.swift +4 −4
| @@ -184,10 +184,10 @@ enum AccessibilityAuditHarness { | ||
| 184 | 184 | // and the search field's hit region at accessibility sizes is the |
| 185 | 185 | // system's own control. Reading `elementType` here is safe; reading |
| 186 | 186 | // `frame` is not (it kills element attribution for the whole audit). |
| 187 | if let type = issue.element?.elementType, type == .searchField || type == .textField { | |
| 188 | if issue.auditType.contains(.textClipped) || issue.auditType.contains(.hitRegion) { | |
| 189 | return "system field placeholder/hit region, length-independent" | |
| 190 | } | |
| 187 | if let type = issue.element?.elementType, | |
| 188 | type == .searchField || type == .textField, | |
| 189 | issue.auditType.contains(.textClipped) || issue.auditType.contains(.hitRegion) { | |
| 190 | return "system field placeholder/hit region, length-independent" | |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | // Unattributed clipped-text/dynamic-type findings. Bisection showed the |
Scripts/audit-a11y.sh +6 −6
| @@ -43,14 +43,14 @@ DEPLOYMENT_TARGET=$( | ||
| 43 | 43 | | awk -F' = ' '/ IPHONEOS_DEPLOYMENT_TARGET = /{print $2; exit}' |
| 44 | 44 | ) |
| 45 | 45 | |
| 46 | if [ -z "${DEPLOYMENT_TARGET:-}" ]; then | |
| 46 | if [[ -z "${DEPLOYMENT_TARGET:-}" ]]; then | |
| 47 | 47 | echo "error: could not read IPHONEOS_DEPLOYMENT_TARGET" >&2 |
| 48 | 48 | exit 1 |
| 49 | 49 | fi |
| 50 | 50 | |
| 51 | 51 | DT_MAJOR="${DEPLOYMENT_TARGET%%.*}" |
| 52 | 52 | DT_MINOR="${DEPLOYMENT_TARGET##*.}" |
| 53 | [ "$DT_MINOR" = "$DEPLOYMENT_TARGET" ] && DT_MINOR=0 | |
| 53 | [[ "$DT_MINOR" = "$DEPLOYMENT_TARGET" ]] && DT_MINOR=0 | |
| 54 | 54 | FLOOR_RANK=$(( DT_MAJOR * 1000 + DT_MINOR )) |
| 55 | 55 | |
| 56 | 56 | echo " deployment target: $DEPLOYMENT_TARGET (rank $FLOOR_RANK)" |
| @@ -82,7 +82,7 @@ run_tier() { | ||
| 82 | 82 | local sim udid label |
| 83 | 83 | |
| 84 | 84 | sim=$(select_sim "$which") |
| 85 | if [ -z "$sim" ]; then | |
| 85 | if [[ -z "$sim" ]]; then | |
| 86 | 86 | echo "error: no iPhone simulator at or above iOS $DEPLOYMENT_TARGET installed" >&2 |
| 87 | 87 | echo "hint: install one with 'xcodebuild -downloadPlatform iOS'" >&2 |
| 88 | 88 | return 1 |
| @@ -94,7 +94,7 @@ run_tier() { | ||
| 94 | 94 | echo |
| 95 | 95 | echo "==> $which: $label" |
| 96 | 96 | |
| 97 | if [ "$which" = "floor" ] && [ "$(echo "$sim" | jq -r .rank)" -ge $(( (DT_MAJOR + 1) * 1000 )) ]; then | |
| 97 | if [[ "$which" = "floor" ]] && [[ "$(echo "$sim" | jq -r .rank)" -ge $(( (DT_MAJOR + 1) * 1000 )) ]]; then | |
| 98 | 98 | echo " NOTE: nearest installed runtime is a major version above the $DEPLOYMENT_TARGET" |
| 99 | 99 | echo " deployment target, so this is not true floor coverage." |
| 100 | 100 | fi |
| @@ -113,7 +113,7 @@ run_tier() { | ||
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | status=0 |
| 116 | if [ "$TIER" = "both" ]; then | |
| 116 | if [[ "$TIER" = "both" ]]; then | |
| 117 | 117 | run_tier floor || status=1 |
| 118 | 118 | run_tier current || status=1 |
| 119 | 119 | else |
| @@ -121,7 +121,7 @@ else | ||
| 121 | 121 | fi |
| 122 | 122 | |
| 123 | 123 | echo |
| 124 | if [ "$status" -eq 0 ]; then | |
| 124 | if [[ "$status" -eq 0 ]]; then | |
| 125 | 125 | echo "==> Done. Findings above are the burndown list for issue #21." |
| 126 | 126 | echo " They are reported, not enforced — widen" |
| 127 | 127 | echo " AccessibilityAuditHarness.enforcedAuditTypes as each phase lands." |