diff --git a/src/components/TinyMCEEditor.jsx b/src/components/TinyMCEEditor.jsx index 510adf17e..cde183286 100644 --- a/src/components/TinyMCEEditor.jsx +++ b/src/components/TinyMCEEditor.jsx @@ -152,6 +152,7 @@ const TinyMCEEditor = (props) => { relative_urls: false, default_link_target: '_blank', target_list: false, + placeholder: props.placeholder, images_upload_handler: uploadHandler, setup, }} diff --git a/src/components/TopicStats.jsx b/src/components/TopicStats.jsx index 23cc02ee8..b3d3f0bc4 100644 --- a/src/components/TopicStats.jsx +++ b/src/components/TopicStats.jsx @@ -39,7 +39,7 @@ const TopicStats = ({ )} > -
+
{threadCounts?.discussion || 0}
@@ -57,7 +57,7 @@ const TopicStats = ({ )} > -
+
{threadCounts?.question || 0}
diff --git a/src/discussions/discussions-home/DiscussionsHome.jsx b/src/discussions/discussions-home/DiscussionsHome.jsx index c46247ddc..413b1405d 100644 --- a/src/discussions/discussions-home/DiscussionsHome.jsx +++ b/src/discussions/discussions-home/DiscussionsHome.jsx @@ -82,7 +82,7 @@ const DiscussionsHome = () => { )}> {!enableInContextSidebar && (
)} -
+
{!enableInContextSidebar && } {(isEnrolled || !isUserLearner) && (
{ const intl = useIntl(); const { courseId } = useParams(); + const navigate = useNavigate(); const isSelected = (id) => window.location.pathname.includes(id); const topicUrl = discussionsPath(Routes.TOPICS.TOPIC, { courseId, @@ -26,16 +28,25 @@ const Topic = ({ return ( <> - isSelected(topic.id)} + onClick={() => { + isSelected(topic.id); + navigate(topicUrl()); + }} + onKeyDown={(e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + isSelected(topic.id); + navigate(topicUrl()); + } + }} aria-current={isSelected(topic.id) ? 'page' : undefined} + aria-selected={isSelected(topic.id)} role="option" tabIndex={(isSelected(topic.id) || index === 0) ? 0 : -1} + style={{ cursor: 'pointer' }} >
@@ -47,7 +58,7 @@ const Topic = ({
- +
{!showDivider && ( <>