WASHINGTON — The White House declined on Friday to renounce or apologize for an aide whose joke at a meeting that Senator John McCain was irrelevant because he would soon die went viral, outraging relatives, friends and admirers of the ailing lawmaker.

Sarah Huckabee Sanders, the White House press secretary, said she would not comment on a closed-door meeting where the joke was made. And she offered no words of regret over the remark or sympathy for Mr. McCain, a Republican senator and two-time presidential candidate who is battling brain cancer at his Arizona ranch.

“I’m not going to validate a leak one way or the other out of an internal staff meeting,” Ms. Sanders said. Asked why she would not simply apologize to Mr. McCain, she said, “I’m not going to get into a back and forth because, you know, people want to create issues of leaked staff meetings.”

But she denied that President Trump, who in 2015 said that Mr. McCain was “not a war hero” because he spent more than five years as a prisoner in North Vietnam and that he preferred “people who weren’t captured,” had set a tone of disrespect. “We have a respect for all Americans and that is what we try to put forward in everything we do, both in word and in action, focusing on doing things that help every American in this country, every single day,” Ms. Sanders said.