Merge pull request #17 from ndarilek/master
Make HTML more semantic to improve accessibility
This commit is contained in:
commit
2d9419c380
7 changed files with 23 additions and 15 deletions
|
@ -55,6 +55,10 @@ limitations under the License.
|
||||||
display: table;
|
display: table;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_RoomView_MessageList_ul {
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_RoomView_invitePrompt {
|
.mx_RoomView_invitePrompt {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,9 @@ module.exports = React.createClass({
|
||||||
var content = mxEvent.getContent();
|
var content = mxEvent.getContent();
|
||||||
var name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender();
|
var name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender();
|
||||||
return (
|
return (
|
||||||
<span className="mx_MEmoteTile mx_MessageTile_content">
|
<li className="mx_MEmoteTile mx_MessageTile_content">
|
||||||
* {name} {content.body}
|
* {name} {content.body}
|
||||||
</span>
|
</li>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,11 +31,11 @@ module.exports = React.createClass({
|
||||||
var cli = MatrixClientPeg.get();
|
var cli = MatrixClientPeg.get();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span className="mx_MFileTile">
|
<li className="mx_MFileTile">
|
||||||
<a href={cli.mxcUrlToHttp(content.url)} target="_blank">
|
<a href={cli.mxcUrlToHttp(content.url)} target="_blank">
|
||||||
{this.presentableTextForFile(content)}
|
{this.presentableTextForFile(content)}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</li>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -59,11 +59,11 @@ module.exports = React.createClass({
|
||||||
if (thumbHeight) imgStyle['height'] = thumbHeight;
|
if (thumbHeight) imgStyle['height'] = thumbHeight;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span className="mx_MImageTile">
|
<li className="mx_MImageTile">
|
||||||
<a href={cli.mxcUrlToHttp(content.url)} target="_blank">
|
<a href={cli.mxcUrlToHttp(content.url)} target="_blank">
|
||||||
<img src={cli.mxcUrlToHttp(content.url, 320, 240)} alt={content.body} style={imgStyle} />
|
<img src={cli.mxcUrlToHttp(content.url, 320, 240)} alt={content.body} style={imgStyle} />
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</li>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -55,11 +55,11 @@ module.exports = React.createClass({
|
||||||
mx_MessageTile_highlight: this.shouldHighlight()
|
mx_MessageTile_highlight: this.shouldHighlight()
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
<div className={classes}>
|
<li className={classes}>
|
||||||
<MessageTimestamp ts={this.props.mxEvent.getTs()} />
|
<MessageTimestamp ts={this.props.mxEvent.getTs()} />
|
||||||
<SenderProfile mxEvent={this.props.mxEvent} />
|
<SenderProfile mxEvent={this.props.mxEvent} />
|
||||||
<TileType mxEvent={this.props.mxEvent} />
|
<TileType mxEvent={this.props.mxEvent} />
|
||||||
</div>
|
</li>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -75,17 +75,21 @@ module.exports = React.createClass({
|
||||||
<div className="mx_RoomView">
|
<div className="mx_RoomView">
|
||||||
<RoomHeader room={this.state.room} />
|
<RoomHeader room={this.state.room} />
|
||||||
<div className="mx_RoomView_roomWrapper">
|
<div className="mx_RoomView_roomWrapper">
|
||||||
<div className="mx_RoomView_messagePanel">
|
<main className="mx_RoomView_messagePanel">
|
||||||
<div ref="messageWrapper" className="mx_RoomView_messageListWrapper" onScroll={this.onMessageListScroll}>
|
<div ref="messageWrapper" className="mx_RoomView_messageListWrapper" onScroll={this.onMessageListScroll}>
|
||||||
<div className="mx_RoomView_MessageList" aria-live="polite">
|
<div className="mx_RoomView_MessageList">
|
||||||
<div className={scrollheader_classes}>
|
<div className={scrollheader_classes}>
|
||||||
</div>
|
</div>
|
||||||
{this.getEventTiles()}
|
<ul className="mx_RoomView_MessageList_ul" aria-live="polite">
|
||||||
|
{this.getEventTiles()}
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<MessageComposer roomId={this.props.roomId} />
|
<MessageComposer roomId={this.props.roomId} />
|
||||||
</div>
|
</main>
|
||||||
<MemberList roomId={this.props.roomId} key={this.props.roomId} />
|
<aside>
|
||||||
|
<MemberList roomId={this.props.roomId} key={this.props.roomId} />
|
||||||
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -40,10 +40,10 @@ module.exports = React.createClass({
|
||||||
return (
|
return (
|
||||||
<div className="mx_MatrixChat">
|
<div className="mx_MatrixChat">
|
||||||
<div className="mx_MatrixChat_chatWrapper">
|
<div className="mx_MatrixChat_chatWrapper">
|
||||||
<div className="mx_MatrixChat_leftPanel">
|
<aside className="mx_MatrixChat_leftPanel">
|
||||||
<RoomList selectedRoom={this.state.currentRoom} />
|
<RoomList selectedRoom={this.state.currentRoom} />
|
||||||
<MatrixToolbar />
|
<MatrixToolbar />
|
||||||
</div>
|
</aside>
|
||||||
<RoomView roomId={this.state.currentRoom} key={this.state.currentRoom} />
|
<RoomView roomId={this.state.currentRoom} key={this.state.currentRoom} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue