For years, Stella Guerrero Mata, a 73-year-old retired school bus driver who lives near Houston, has been able to cast her vote through the mail with little hassle. Ms. Mata, who uses a cane to walk and suffers from a long list of ailments, including diabetes, worsening eyesight and back pain, expected the 2022 midterm elections to be no different.

But sometime after she placed her ballot in the mail, she received a letter with news that left her angry and confused. Her ballot was not accepted because she had failed to include her driver’s license number and the last four digits of her Social Security number, a requirement of a contested new voting law that was approved in 2021.

“My vote was rejected,” Ms. Mata said, adding that she had realized it was too late for her to correct her mistake. “It made me feel angry, because my voice was not being heard.”

Ms. Mata was one of several voters to testify in a trial, now underway in San Antonio, over the state’s sweeping election overhaul, known as S.B. 1. The law was passed by a Republican majority even after Democratic lawmakers staged a 38-day walkout, leaving the state in an unsuccessful effort to prevent the bill from coming to a vote.

Since it went into effect, critics have raised concerns that the law would impede voters with disabilities, elderly voters and voters who do not speak English. The federal trial, now entering its second week, is providing an unusual opportunity to hear directly from voters who wanted to cast a vote but were not able to do so.

A coalition of voting rights groups, including MALDEF, the Mexican American Legal Defense and Educational Fund, and the American Civil Liberties Union of Texas, claim in their lawsuit that the law hurts people who vote by mail, those who use the help of aides known as assisters to vote and those who rely on community organizations to learn about where and how to vote.

The law added new voter identification requirements for voting by mail; made it harder to use voter assisters; set criminal penalties for poll workers if they are too forceful in reining in people at polling places; and banned 24-hour voting and drive-through voting, measures that were notably used in Harris County during the pandemic.

Lawyers representing the state countered that the new rules prevent potential voter fraud and that voters seem to be adapting better with every passing election. Election integrity means that voters “are going to have confidence in the process,” said Ryan Kercher, a lawyer for the state. In addition, Mr. Kercher said, the law allows for expanded early-voting hours to encourage more voter participation.

During cross-examination, another lawyer for the state, Will Wassdorf, pointed out to Ms. Mata that she had entered the required information in an application for a mail ballot, but that she did not do so when she mailed the actual ballot. Mr. Wassdorf then directed her attention to a video screen that showed the entries she had left blank.

“Do you understand that that’s why your ballot was rejected?” he asked her.

“Now I do. At this time, yes,” she replied.

Asked by one of the plaintiffs’ lawyers, Fátima Menéndez, if she would have the confidence to cast a vote by mail in 2024, Ms. Mata replied that she was not sure. “I feel like it would not be counted at all,” she said.

A parade of election officials from Dallas, Austin, El Paso and the Rio Grande Valley also testified that they found many of the new regulations confusing and vague and that they often struggled to explain them to equally confused voters.

“I did not know what to tell voters,” said Dana DeBeauvoir, a county clerk in Travis County, home to Austin, who oversaw several elections before she retired. Ms. DeBeauvoir described the purported problem of voter fraud as “a unicorn,” at best, “ones and twos out of millions of votes, and in most cases unintentional.”

Mr. Kercher seized on that during cross-examination. “Even though voter fraud is a unicorn, we still have to be vigilant,” he said.

“I always was,” she replied.

The judge in the case, Xavier Rodriguez, of the Western District of Texas, is expected to listen to testimony for the next few weeks before issuing an order.

Judge Rodriguez previously found one part of the law to be unlawful: its requirement that voters write down either the last four digits of their Social Security number or a driver’s license’s number when requesting to vote by mail and that election workers be able to match one of the numbers with the voter’s registration records.

Judge Rodriguez, an appointee of former President George W. Bush, ruled that the requirement violated the Civil Rights Act because elections officials may be turning away voters who otherwise qualify to vote by mail but have a hard time providing the extra information.

The A.C.L.U. of Texas said that about 40,000 submissions for mail-in voting ballots have been rejected for errors connected to this requirement.

Nina Perales, a lawyer with MALDEF, argued during her opening statement that voters with disabilities are among the most affected.

“Adding more steps to the voting process and requiring more forms makes voting more difficult, and it reduces the number of ballots cast,” Ms. Perales said. “This imposes significant and more obstacles for disabled voters and will cause disabled voters to be disenfranchised.”

The new voting law became a priority for Gov. Greg Abbott after former President Donald J. Trump claimed he lost the 2020 election because of election fraud, a claim that has been discounted by judges around the country. Nevertheless, Mr. Abbott threatened to call a special session of the Legislature until lawmakers sent him the voting bill to sign.

The legislation followed a series of voting changes adopted in several urban areas across Texas, places largely dominated by Democrats, that were designed to make it easier for eligible voters to cast ballots. Houston, for example, drew national attention by offering 24-hour drive-through voting at the height of the pandemic.

The defense has not yet begun presenting a case. Much of the first week was taken up by voters and election officials, called by the plaintiffs, who detailed their struggles with the new rules.

Toby Cole, a lawyer who lost the use of his arms and legs after an accident when he was 18 and votes with the help of an aide, testified that he felt uncomfortable sharing his medical information with poll workers when voting in person, a method he prefers, in order to have an aide assist in casting his ballot.

Mr. Cole said he knows of many fellow voters with disabilities who may choose not to vote in person or at all because they do not feel comfortable sharing why they qualify for extra assistance.

He has been able to vote, he said, only “because I’m persistent.”

Kirsten Noyes contributed research.