mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Some accessibility fixes in Chat room
This commit is contained in:
parent
2f25d70bf2
commit
5149a6d890
3 changed files with 19 additions and 1 deletions
|
|
@ -174,6 +174,9 @@
|
|||
<rect key="frame" x="39" y="12" width="218" height="33"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Message field">
|
||||
<bool key="isElement" value="YES"/>
|
||||
</accessibility>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
<rect key="frame" x="-8" y="-11" width="310" height="126"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Chat Message"/>
|
||||
<color key="textColor" red="0.35686275360000003" green="0.3960784376" blue="0.43529412150000002" alpha="1" colorSpace="deviceRGB"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
|
|
@ -79,6 +80,9 @@
|
|||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="chat_message_not_delivered.png" id="26" userLabel="status">
|
||||
<rect key="frame" x="284" y="104" width="10" height="10"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Message status">
|
||||
<bool key="isElement" value="YES"/>
|
||||
</accessibility>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="18" userLabel="deleteButton">
|
||||
<rect key="frame" x="250" y="0.0" width="44" height="44"/>
|
||||
|
|
|
|||
|
|
@ -197,17 +197,21 @@ static UIFont *CELL_FONT = nil;
|
|||
[dateFormatter release];
|
||||
|
||||
LinphoneChatMessageState state = linphone_chat_message_get_state(chat);
|
||||
BOOL outgoing = linphone_chat_message_is_outgoing(chat);
|
||||
|
||||
if( !linphone_chat_message_is_outgoing(chat) ){
|
||||
if( !outgoing ){
|
||||
statusImage.hidden = TRUE; // not useful for incoming chats..
|
||||
} else if (state== LinphoneChatMessageStateInProgress) {
|
||||
[statusImage setImage:[UIImage imageNamed:@"chat_message_inprogress.png"]];
|
||||
[statusImage setAccessibilityValue:@"in progress"];
|
||||
statusImage.hidden = FALSE;
|
||||
} else if (state == LinphoneChatMessageStateDelivered) {
|
||||
[statusImage setImage:[UIImage imageNamed:@"chat_message_delivered.png"]];
|
||||
[statusImage setAccessibilityValue:@"delivered"];
|
||||
statusImage.hidden = FALSE;
|
||||
} else {
|
||||
[statusImage setImage:[UIImage imageNamed:@"chat_message_not_delivered.png"]];
|
||||
[statusImage setAccessibilityValue:@"not delivered"];
|
||||
statusImage.hidden = FALSE;
|
||||
|
||||
NSAttributedString* resend_text = [[NSAttributedString alloc]
|
||||
|
|
@ -216,6 +220,13 @@ static UIFont *CELL_FONT = nil;
|
|||
[dateLabel setAttributedText:resend_text];
|
||||
[resend_text release];
|
||||
}
|
||||
|
||||
if( outgoing){
|
||||
[messageText setAccessibilityLabel:@"Outgoing message"];
|
||||
} else {
|
||||
[messageText setAccessibilityLabel:@"Incoming message"];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)setEditing:(BOOL)editing {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue