@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add aural "+" and "-" hints to unified diffs for users who use screenreaders

Summary: See PHI160 for discussion.

Test Plan:
With `?__aural__=1`, saw aural hints:

{F5229986}

Without, saw normal visual diff.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D18718

+30 -2
+30 -2
src/applications/differential/render/DifferentialChangesetOneUpRenderer.php
··· 41 41 42 42 $column_width = 4; 43 43 44 + $aural_minus = javelin_tag( 45 + 'span', 46 + array( 47 + 'aural' => true, 48 + ), 49 + '- '); 50 + 51 + $aural_plus = javelin_tag( 52 + 'span', 53 + array( 54 + 'aural' => true, 55 + ), 56 + '+ '); 57 + 44 58 $out = array(); 45 59 foreach ($primitives as $k => $p) { 46 60 $type = $p['type']; ··· 55 69 if ($is_old) { 56 70 if ($p['htype']) { 57 71 $class = 'left old'; 72 + $aural = $aural_minus; 58 73 } else { 59 74 $class = 'left'; 75 + $aural = null; 60 76 } 61 77 62 78 if ($type == 'old-file') { ··· 79 95 ), 80 96 $line); 81 97 98 + $render = $p['render']; 99 + if ($aural !== null) { 100 + $render = array($aural, $render); 101 + } 102 + 82 103 $cells[] = phutil_tag('th', array('class' => $class)); 83 104 $cells[] = $no_copy; 84 - $cells[] = phutil_tag('td', array('class' => $class), $p['render']); 105 + $cells[] = phutil_tag('td', array('class' => $class), $render); 85 106 $cells[] = $no_coverage; 86 107 } else { 87 108 if ($p['htype']) { 88 109 $class = 'right new'; 89 110 $cells[] = phutil_tag('th', array('class' => $class)); 111 + $aural = $aural_plus; 90 112 } else { 91 113 $class = 'right'; 92 114 if ($left_prefix) { ··· 98 120 $oline = $p['oline']; 99 121 100 122 $cells[] = phutil_tag('th', array('id' => $left_id), $oline); 123 + $aural = null; 101 124 } 102 125 103 126 if ($type == 'new-file') { ··· 120 143 ), 121 144 $line); 122 145 146 + $render = $p['render']; 147 + if ($aural !== null) { 148 + $render = array($aural, $render); 149 + } 150 + 123 151 $cells[] = $no_copy; 124 - $cells[] = phutil_tag('td', array('class' => $class), $p['render']); 152 + $cells[] = phutil_tag('td', array('class' => $class), $render); 125 153 $cells[] = $no_coverage; 126 154 } 127 155